[Python-ideas] x=(yield from) confusion [was:Yet another alternative name for yield-from]

Greg Ewing greg.ewing at canterbury.ac.nz
Sat Apr 11 03:08:14 CEST 2009

Nick Coghlan wrote:

> Note that my example actually *does* modify the class as it goes along
> (for exactly the reason you give - next() has to be defined on the class
> or the interpreter will ignore it).

Sorry, I didn't notice you were doing that.

But this doesn't seem useful to me. What if you
have two instances of Tricky in use at the same
time? They're going to interfere with each other.

I suppose you could make it work if you created
a new class each time. But my earlier comment
stands -- I don't want to preclude optimizing the
common case for the sake of an uncommon case.


More information about the Python-ideas mailing list