generator object, next method

Diez B. Roggisch deets at nospam.web.de
Thu Sep 8 04:36:40 EDT 2005


simonwittber at gmail.com wrote:
>>Why is that?  I thought gen.next is a callable and gen.next() actually
>>advances the iterator.  Why shouldn't gen.next always be the same object?
> 
> 
> That is, in essence, my question.

Because bound methods are generated on  the fly - google this group, 
there have been plenty of discussions about that.

Diez



More information about the Python-list mailing list