[Python-3000] Need closure on __cmp__ removal
Marcin ‘Qrczak’ Kowalczyk
qrczak at knm.org.pl
Wed Jan 9 18:16:54 CET 2008
Dnia 09-01-2008, Śr o godzinie 01:49 +0100, Christian Heimes pisze:
> You could write and implement a PEP about exposing the tp_richcompare
> slot to Python code.
How is it better than separate __eq__, __lt__ etc.? In most cases the
rich comparison starts with dispatching on the operation and treats each
one independently; I suppose only rarely it is forwarded to another
object without looking at the operation. So usually it is less
convenient and slower than separate methods.
__("< Marcin Kowalczyk
\__/ qrczak at knm.org.pl
More information about the Python-3000