Guido van Rossum wrote: > That said, if there's a use case, I agree that it would be okay with > basing the equality of x.foo and y.foo on whether x and y are the same > object, not on whether x==y (consider 0 .__add__ == 0.0 .__add__).
The use case in the issue tracker was maintaining a collection of unique callbacks, some of which could be bound methods - the current behaviour is actively harmful to that use case, since some of the later callbacks may fail to register properly (due to their self comparing equal to another instance of the same type that already had its callback method in the list). That same use case is what makes it useful to consider the same method on a single object to be equal - there is little point in having a bound method like "x.notify" in a callback list twice. So for myself, +1 on acknowledging issue 1617161 as a bug and fixing it as Armin suggests. Cheers, Nick. -- Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia --------------------------------------------------------------- http://www.boredomandlaziness.org _______________________________________________ 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