Mark Dickinson wrote: > On Tue, Sep 22, 2009 at 3:37 PM, Chris Withers > <ch...@simplistix.co.uk> wrote: >> Where are the specifications on what happens if two objects are >> compared and both have implementations of __eq__? Which __eq__ is >> called? What happens if the first one called returns False? Is the >> second one called? What is one implements __eq__ and the other >> __ne__? > > I (still :-) think this is covered, for Python 2.x at least, by: > > http://docs.python.org/reference/datamodel.html#coercion-rules
Quite some time ago, I attempted to accurately document all of this - my efforts are buried in an ODF document in the SVN sandbox: http://svn.python.org/view/sandbox/trunk/userref/ODF/Chapter02_StatementsAndExpressions.odt Extracting all of that text with some kind of ODT2ReST converter has now been on my to-do list for over a year :P Cheers, Nick. -- Nick Coghlan | ncogh...@gmail.com | Brisbane, Australia --------------------------------------------------------------- _______________________________________________ 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