Hi,

Hoyt Koepke wrote:
> Something seems really wrong here, maybe with my code.  It seems that
> the self argument of __richcmp__ is not typed correctly.  Before I
> file a bug report, is __richcmp__ treated as a static method with the
> arguments still being each of the tested objects?

Sort of. It's mapped to PyObject_RichCompare(), which takes two arbitrary
objects and compares them.

http://docs.python.org/c-api/object.html

The C-API does this as the first object may not support the required
operation, in which case the operands will end up being reversed and passed
to the second object.

I just noticed that this isn't in the FAQ in our Wiki. It's definitely
worth going there.

Stefan

_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to