In Python, you can write if C.__eq__ == object.__eq__: print('class C does not override __eq__')
Does that help? On Thu, Nov 8, 2012 at 9:55 AM, Tres Seaver <tsea...@palladion.com> wrote: > -----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 tsea...@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----- -- --Guido van Rossum (python.org/~guido) _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com