2011/1/15 Stefan Behnel <stefan...@behnel.de>:
> Vitja Makarov, 15.01.2011 15:02:
>> Looking into pyregr test log, I found that this code crashes cython compiler:
>>
>> print('\uXX')
>>
>> Here is traceback:
>>
>>    File "Cython/Compiler/Parsing.py", line 788, in p_string_literal
>>      chrval = int(systr[2:], 16)
>> ValueError: invalid literal for int() with base 16: ''
>
> Hmm, right, the scanner notices that '\uXX' is not a valid Unicode escape
> sequence and reads it as '\u' + 'XX'.
>
> Good catch, I'll fix it.
>
> http://trac.cython.org/cython_trac/ticket/647
>

Please notice that '\u' is valid string but not unicode string,
so it's valid in py2 and not py3.

-- 
vitja.
_______________________________________________
Cython-dev mailing list
Cython-dev@codespeak.net
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to