guido van rossum hoaufpythonorg sun mar 9 2008 951 adam olsen wrote sun mar 9 2008 902 armin rigo wrote hi python 25 made attempt make equality consistent various builtin userdefined method types failed though explained httpbugspythonorgissue1617161 outcome discussion first need decide behavior correct append append true false see issue tracker answer probably false general question xfoo yfoo resolve method xfoo yfoo delegate x based x behavior always purely accidental three different results userdefined methods versus builtin methods versus method wrappers know latter raise hand yes python 25 managed three different behaviors instead two one types dont ask would base equality identity self still compute hash hash self compare equal interchangeable case mutable container ie list value comparison self irrelevant garbage always compared hashed based identity iow x xappend xappend true everything else false perhaps think approach perspective useful behavior straightforward implement right since one right much use case id okay providing various forms bound methods equality fall back may surprising xappend xappend surprising x1 x1 certain circumstances actually provide useful insight implementation said theres use case agree would okay basing equality xfoo yfoo whether x object whether xy consider 0 __add__ 00 __add__ guido van rossum home page httpwwwpythonorgguido _______________________________________________ pythondev mailing list zvlllneumpythonorg httpmailpythonorgmailmanlistinfopythondev unsubscribe httpmailpythonorgmailmanoptionspythondevpythondev40tangomucom tue 05 aug 2008 214938 0800 pythondev equality method objects