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

Greg Ewing greg.ewing at canterbury.ac.nz
Sun Apr 12 08:02:16 CEST 2009


Nick Coghlan wrote:

> We already have a general caveat in the docs saying that an
> implementation is allowed (or sometimes even required) to bypass normal
> attribute lookup for special methods defined by the language.

However, in 2.x it's not obvious that next() is a special
method, because it doesn't have an __xxx__ name.

I think what I'll do is this:

* Use Python 3 syntax for the expansion, and write
   next(_i) instead of _i.next().

* Not say anything one way or the other about cacheing
   methods.

-- 
Greg



More information about the Python-ideas mailing list