Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

no, default parameter should not be evaluated every time the function gets called.

current behavior is totally fine. it is well defined that somelist.append(x) appends x to somelist inplace.



Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: