[Cython] Recent bugs in generators

Vitja Makarov vitja.makarov at gmail.com
Tue Apr 19 07:49:19 CEST 2011


2011/4/19 Stefan Behnel <stefan_ml at behnel.de>:
> Vitja Makarov, 18.04.2011 15:19:
>>
>> There is one more interesting thing:
>>
>> def test_yield_inside_genexp():
>>     """
>>     >>>  o = test_yield_inside_genexp()
>>     >>>  list(o)
>>     [0, None, 1, None, 2, None]
>>     """
>>     return ((yield i) for i in range(3))
>
> Impressively ugly.
>
> I guess we should start testing these things with other Python
> implementations than CPython, in order to see if these corner cases are
> really being accepted and knowingly being implemented, or if it's just
> something that no-one has really cared about so far and that's actually
> worth discussing.
>

The case above is yield inside genexp and it works now.

Btw we've found one more funny thing this time with parser: 0lor(1)


-- 
vitja.


More information about the cython-devel mailing list