Robert Bradshaw, 17.11.2010 08:40:
> On Mon, Nov 15, 2010 at 9:04 AM, Darren Dale wrote:
>> I can cythonize this code:
>>
>> def test():
>> sentinal = '3'
>> with open('foo.txt', 'w') as f:
>> sentinal == '1' or sentinal == '2'
>>
>> or this:
>>
>> def test():
>> sentinal = '3'
>> with open('foo.txt', 'w') as f:
>> pass
>> sentinal in ('1', '2')
>>
>> but not this:
>>
>> def test():
>> sentinal = '3'
>> with open('foo.txt', 'w') as f:
>> sentinal in ('1', '2')
>>
>>
>> $ cython test_open.pyx
>>
>> Error converting Pyrex file to C:
>> ------------------------------------------------------------
>> ...
>> def test():
>> sentinal = '3'
>> with open('foo.txt', 'w') as f:
>> ^
>> ------------------------------------------------------------
>>
>> /Users/darren/temp/test/test_open.pyx:3:4: Compiler crash in
>> AnalyseExpressionsTransform
>>
> Yep, looks like a bug to me.
In general, it is a bug if the compiler crashes on whatever code, instead
of printing a suitable error message. Please file a bug report.
Stefan
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev