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

It's actually worse in Python since there's no support for variable lifetimes within a function, so the `v2` workaround is still broken. (the default-argument workaround "works" but is scary)

This makes it clear: the underlying problem is NOT about for loops - it's closures that are broken.



It's not broken, it's a different design. Maybe worse in a lot of cases, but it's not broken. It's working as intended.


You could say the design is broken, but the implementation is working as intended by the design.




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

Search: