Antoine Pitrou wrote:
> Stefan Behnel behnel.de> writes:
>> IMHO, that's pretty far from obvious when you look at the code.
>
> A "yield" wrapped in a list comprehension looks far from obvious IMO anyway,
> whether in 2.x or 3.x. It's this kind of "smart" writing tricks people find
> that
> only
Stefan Behnel behnel.de> writes:
>
> IMHO, that's pretty far from obvious when you look at the code.
A "yield" wrapped in a list comprehension looks far from obvious IMO anyway,
whether in 2.x or 3.x. It's this kind of "smart" writing tricks people find that
only makes code more difficult to rea
Nick Coghlan wrote:
> Stefan Behnel wrote:
>> This is also an important issue for other Python implementations. Cython
>> simply transforms comprehensions into the equivalent for-loop, so when we
>> implement PEP 342 in Cython, we will have to find a way to emulate
>> CPython's behaviour here (unle
Stefan Behnel wrote:
> This is also an important issue for other Python implementations. Cython
> simply transforms comprehensions into the equivalent for-loop, so when we
> implement PEP 342 in Cython, we will have to find a way to emulate
> CPython's behaviour here (unless we decide to stick with
[moving this from the bug tracker]
Alexandre Vassalotti wrote:
> Alexandre Vassalotti added the comment:
>
> Not a bug.
>
> The list comprehension in your chunker:
>
> while True:
> target.send([ (yield) for i in range(chunk_size) ])
>
> is equivalent to the following generator in