9 ms·
This was killing me when back when I was a Python dev. A "generator" is just a callable object made less reasonable.
by activitypea 4y ago
This was killing me when back when I was a Python dev. A "generator" is just a callable object made less reasonable.
- throwawaymaths 4y agoEven 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.
- Izkata 4y agoI mean, if we're talking python here, functions are callable objects.
- throwawaymaths 4y agoGood point.
- eurasiantiger 4y agoFunctions are objects too.