[email protected] wrote: > Also, unlike most other special methods, I noticed that if I defined > __richcmp__ as below (removing the type declaration for self): > > def __richcmp__(self, A other, int op): > print "using op: ",op > if op == 2: # == > return self.a == other.a > > then self can't access the cdef'd "a" attribute.
See: http://docs.cython.org/docs/special_methods.html particularly the section "Arithmetic Methods". It could perhaps be made more clear that this applies to the __richcmp__ method as well. -- Greg _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
