Mark Dickinson wrote: > On Tue, Sep 22, 2009 at 3:37 PM, Chris Withers > <chris at 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 | ncoghlan at gmail.com | Brisbane, Australia ---------------------------------------------------------------
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4