phillip j eby moetelecommunitycom 0159 pm 392008 0800 guido van rossum wrote much use case ive often apis take callback promise invoke callback even added ive used dicts lists sets however need equality bound methods based object value equality value identity least recently anyway one library wants equalitybased comparison im_self ended writing code tests current python interpreter necessary implements special method type purposes working around absence im_self equality testing however pretty specialized case didnt support older python versions id use partial assuming partial supports hashing equality comparisons havent checked imagine hashing partial might least tricky getting bound methods right said theres use case agree would okay basing equality xfoo yfoo whether x object whether xy consider 0 __add__ 00 __add__ 1 making two bound methods m1 m2 equal m1im_self m2im_self m1im_funcm2im_func making hash based im_func idim_self dont think im_func comparison identitybased default however im_func could another bound method example _______________________________________________ pythondev mailing list zvlllneumpythonorg httpmailpythonorgmailmanlistinfopythondev unsubscribe httpmailpythonorgmailmanoptionspythondevpythondev40tangomucom wed 06 aug 2008 015528 0400 pythondev equality method objects