[[Python-Dev] PyObject_RichCompareBool identity shortcut] About specializing comparing objects in collections
![](https://secure.gravatar.com/avatar/d0ea972cf6651315c11bff7dc0a52733.jpg?s=120&d=mm&r=g)
April 29, 2011
7:16 a.m.
It was necessary to clarify the reason for the possible introduction of a special method __equals__. The fact that the objects in python are often interpreted as values. Method __eq__, IMHO is used more for comparing objects as values. Introduction of method __equals__ can explicitly indicate the method of comparison of the objects as objects and __eq__ objects as values. If method __equals__ is not defined then __eq__ will be used. -- Zaur
5036
Age (days ago)
5036
Last active (days ago)
0 comments
1 participants
participants (1)
-
ZS