[Cython] Scoped expressions and generators problem

Vitja Makarov vitja.makarov at gmail.com
Thu May 19 22:34:34 CEST 2011


I don't know how to handle scopedexprs in generators, here are some examples:

[(yield i) for i in l] or [i for i in yield]

In Python3 language mode scoped expression is created for list
comprehension and loop variable is moved there.
So now it isn't stored inside generator closure and is lost between yields.

Btw there is one more problem I hope that's easy to solve:
yield expression inside scoped expression is counted twice.

-- 
vitja.


More information about the cython-devel mailing list