generator object, next method

simonwittber at gmail.com simonwittber at gmail.com
Thu Sep 8 09:27:05 CEST 2005


>>> gen = iterator()
>>> gen.next
<method-wrapper object at 0x009D1B70>
>>> gen.next
<method-wrapper object at 0x009D1BB0>
>>> gen.next
<method-wrapper object at 0x009D1B70>
>>> gen.next
<method-wrapper object at 0x009D1BB0>
>>> gen.next is gen.next
False


What is behind this apparently strange behaviour? (The .next method
seems to alternately bind to two different objects)

Sw.




More information about the Python-list mailing list