Lisandro Dalcin, 28.04.2010 01:21:
> diff -r 3adaf1ef25b9 Cython/Compiler/TypeSlots.py
> --- a/Cython/Compiler/TypeSlots.py Tue Apr 27 21:36:49 2010 +0200
> +++ b/Cython/Compiler/TypeSlots.py Tue Apr 27 20:14:34 2010 -0300
> @@ -637,7 +637,7 @@
> EmptySlot("tp_print"), #MethodSlot(printfunc, "tp_print", "__print__"),
> EmptySlot("tp_getattr"),
> EmptySlot("tp_setattr"),
> - MethodSlot(cmpfunc, "tp_compare", "__cmp__"),
> + MethodSlot(cmpfunc, "tp_compare", "__cmp__", py3k = '<RESERVED>'),
> MethodSlot(reprfunc, "tp_repr", "__repr__"),
>
> SuiteSlot(PyNumberMethods, "PyNumberMethods", "tp_as_number"),
>
> BTW, Should I push this?
Absolutely.
> We could try to synthesize __richcmp__ from __cmp__
We shouldn't. __richcmp__ is the right thing to implement. If we consider
emulating it from something, that would be the eq/lt/gt/... special methods.
Stefan
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev