[Python-Dev] Intricacies of calling __eq__

Antoine Pitrou solipsis at pitrou.net
Wed Mar 19 16:07:16 CET 2014


On Wed, 19 Mar 2014 07:09:23 -0700
Thomas Wouters <thomas at python.org> wrote:
> 
> He means you're being unrealistically pedantic :) The number of calls to
> __eq__ is _already_ unpredictable, since (as Mark Shannon said) it depends
> among other things on the hashing algorithm and the size of the dict.

Well, I was not arguing that the optimization would be an important
compatibility break. Obviously, an __eq__ which would break this
optimization would be particularly dubious (and probably wrong for
other reasons) :-)

Regards

Antoine.


More information about the Python-Dev mailing list