[Cython] Cython 0.23: long + int == int

Jakub Wilk jwilk at jwilk.net
Thu Aug 20 11:52:10 CEST 2015


* Stefan Behnel <stefan_ml at behnel.de>, 2015-08-17, 20:33:
>>$ cat testlong.pyx
>>def f(x):
>>       return 0L + x
>>$ python2.6 -c 'import pyximport as p; p.install(); import testlong; print
>>type(testlong.f(42))'
>><type 'int'>
>>
>>I added a long to an int, so I'd expect the result to be a long.
[...]
>I understand that this is not entirely correct, but does it pose any 
>problems in practice?

It broke my test suite, which is how I noticed; but yeah, I don't think 
it's a big deal.

-- 
Jakub Wilk


More information about the cython-devel mailing list