[Python-Dev] Detecting tp_compare / tp_richcompare from Python

Tres Seaver tseaver at palladion.com
Thu Nov 8 18:55:47 CET 2012


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 11/08/2012 12:38 PM, Guido van Rossum wrote:
> Well, the default behavior has changed to raise an exception when 
> using <, <=, >, >=; i.e., inequalities do not have a default 
> implementation at all. Perhaps that is enough for your purpose? ==
> and != still compare by pointer, but you're primarily interested in 
> ordering her, right?

The b-search algorithm needs ordering on keys, but also meaningful
(non-identity) equality.


Tres.
- -- 
===================================================================
Tres Seaver          +1 540-429-0999          tseaver at palladion.com
Palladion Software   "Excellence by Design"    http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iEYEARECAAYFAlCb8iMACgkQ+gerLs4ltQ6WOACgwERmICWr80qnEoOVVLQtFwTH
ttAAnAt4An0dPjaRuZyJlDAUGzH0CS7B
=u2mG
-----END PGP SIGNATURE-----


More information about the Python-Dev mailing list