[Cython] Cython mishandles None in slices

Stefan Behnel stefan_ml at behnel.de
Sat Apr 13 08:19:26 CEST 2013


Bryan O'Sullivan, 13.04.2013 05:02:
> 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

Have you tried it with the latest beta?

http://cython.org/release/Cython-0.19b2.tar.gz

Stefan



More information about the cython-devel mailing list