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

This was killing me when back when I was a Python dev. A "generator" is just a callable object made less reasonable.


Even callable objects are kinda brain breaking. I used to joke that the duality of callable objects (and getter/setters, function prototypes in js) were as mysterious as the wave/particle duality in quantum mechanics.


I mean, if we're talking python here, functions are callable objects.


Good point.


Functions are objects too.




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

Search: