Dear Stefan, In data mercoledì 3 dicembre 2014 16:44:13, Stefan Behnel ha scritto: > 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
thanks for the pointer. Then I guess the documentation could be improved by e.g. saying something similar to: [...] The self parameter of a method of an extension type is guaranteed never to be None. (Note: arithmetic methods might be an exception to this rule. [http://docs.cython.org/src/userguide/special_methods.html#arithmetic-methods]). [...] Cheers, Samuele -- Samuele Kaplun Invenio Developer ** <http://invenio-software.org/> _______________________________________________ cython-devel mailing list cython-devel@python.org https://mail.python.org/mailman/listinfo/cython-devel