A RetroSearch Logo

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

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2014-March/133280.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
Wed Mar 19 14:21:16 CET 2014
On Wed, Mar 19, 2014 at 3:17 PM, Antoine Pitrou <solipsis at pitrou.net> wrote:
> On Wed, 19 Mar 2014 15:09:04 +0200
> Maciej Fijalkowski <fijall at gmail.com> wrote:
>>
>> I would like to point out that instructing people does not really
>> work. Besides, other examples like this:
>>
>> if d[x] >= 3:
>>    d[x] += 1 don't really work.
>
> That's a good point. But then, perhaps PyPy should analyze the __eq__
> method and decide whether it's likely to have side effects or not (the
> answer can be hard-coded for built-in types such as str).
>
> Regards
>
> Antoine.

Ok. But then how is it valid to have "is" fast-path?
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