[Cython] Cython mishandles None in slices

Bryan O'Sullivan bos at serpentine.com
Sat Apr 13 05:02:23 CEST 2013


Here are two lines of valid Python:

>>> 'abc'[None:2]
'ab'
>>> 'abc'[1:None]
'bc'

If I try this in code that I compile with Cython, it throws an exception:

TypeError: 'NoneType' object cannot be interpreted as an index
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/cython-devel/attachments/20130412/c9ecfe18/attachment-0001.html>


More information about the cython-devel mailing list