A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2014-March/133228.html below:

[Python-Dev] Intricacies of calling __eq__

[Python-Dev] Intricacies of calling __eq__ [Python-Dev] Intricacies of calling __eq__Maciej Fijalkowski fijall at gmail.com
Tue Mar 18 08:52:05 CET 2014
Hi

I have a question about calling __eq__ in some cases.

We're thinking about doing an optimization where say:

if x in d:
   return d[x]

where d is a dict would result in only one dict lookup (the second one
being constant folded away). The question is whether it's ok to do it,
despite the fact that it changes the semantics on how many times
__eq__ is called on x.

Cheers,
fijal
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4