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

> A very common pattern in Scheme and JavaScript (...) is to use closures to encapsulate state. Thanks to Python's scoping model, this is at best a pain and certainly unnatural.

It is also unnecessary. Python has normal classes, so you can contain your state within objects rather than stackframes.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

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

Search: