Generators and their next() and send() methods

Thomas Mlynarczyk thomas at
Wed Nov 19 00:20:11 CET 2008

Aaron Brady schrieb:

> And, if you don't intend to use 'myway' on 'listiterator's and such,
> 'send( None )' is equivalent to 'next( )'.

I didn't know that. But doesn't that impose a restriction somehow? It 
makes it impossible to send a None to a generator.


Ce n'est pas parce qu'ils sont nombreux à avoir tort qu'ils ont raison!

More information about the Python-list mailing list