Package: cython
Version: 0.13-1
Severity: normal
For code like
eggs[n:]
cython generates code which is more or less equivalent to:
eggs.__getitem__(slice(n, sys.maxint, None))
rather than:
eggs.__getitem__(slice(n, None, None))
This works well for lists and other built-in object, but not necessarily
for objects of custom classes. For example:
$ python -c 'import pyximport as p; p.install(); import slicetest'
slice(0, 2147483647, None)
$ python -c 'execfile("slicetest.pyx")'
slice(0, None, None)
-- System Information:
Debian Release: squeeze/sid
APT prefers unstable
APT policy: (990, 'unstable'), (500, 'experimental'), (500, 'testing')
Architecture: i386 (x86_64)
Kernel: Linux 2.6.32-5-amd64 (SMP w/2 CPU cores)
Locale: LANG=C, LC_CTYPE=pl_PL.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages cython depends on:
ii libc6 2.11.2-7 Embedded GNU C Library: Shared lib
ii python 2.6.6-5 interactive high-level object-orie
ii python-support 1.0.12 automated rebuilding support for P
ii python2.6 2.6.6-6 An interactive high-level object-o
cython recommends no packages.
Versions of packages cython suggests:
ii gcc 4:4.4.5-1 The GNU C compiler
-- no debconf information
--
Jakub Wilk
class Test(object):
def __getitem__(self, obj):
print obj
Test()[0:]