[Cython] Possible bug (or wrong documentation) WRT "not None"

Stefan Behnel stefan_ml at behnel.de
Wed Dec 3 16:44:13 CET 2014


Samuele Kaplun schrieb am 02.12.2014 um 14:13:
> I would like to report what I think is a possible bug (in cython or 
> corresponding documentation).
> 
> According to:
> <http://docs.cython.org/src/userguide/extension_types.html#extension-types-and-none>
> 
> [...]
> The self parameter of a method of an extension type is guaranteed never to be 
> None.
> [...]
> 
> However given this snippet:
> [...]
> cdef class test:
>     def __sub__(self, test rhs not None):
>         print "self is %s" % repr(self), "rhs is %s" % repr(rhs)
> [...]

http://docs.cython.org/src/userguide/special_methods.html#arithmetic-methods

Stefan



More information about the cython-devel mailing list