On Friday, March 13, 2015 at 1:53:50 PM UTC+5:30, Chris Angelico wrote: > On Fri, Mar 13, 2015 at 4:28 PM, Rustom Mody wrote: > > And even there I would expect generators to close with StopIteration > > Whereas I would expect coroutines to close (on close method) with > > GeneratorExit > > [Ive not thought all this through properly so may be off the mark] > > I expect both of them to close with "return".
Nice demo of the same confusing terminology we are talking about. When I say "expect generators to close" I mean 'generator-instances' ie at runtime When you say "expect both to close with return" you are talking of program-texts ie the 'factory' [Or I am guilty of the same I am accusing python of] -- https://mail.python.org/mailman/listinfo/python-list