On Sun, Mar 15, 2015 at 2:29 AM, Rustom Mody <rustompm...@gmail.com> wrote: > However a "generator function" is a weird sort of function (at best). > Not regarding it as a function is IMO more reasonable.
But it *is* a function. You call it, possibly with positional and/or keyword arguments, and you get back a returned object. How is this different from any other function? (Yes, by this definition a class could be called an "object function". But the line is already somewhat blurry; if I've read my history correctly, "int" used to be a function, but now it's a type. A class is really just a special type of factory function, just as a generator function is.) ChrisA -- https://mail.python.org/mailman/listinfo/python-list