[Python-Dev] Intricacies of calling __eq__
Maciej Fijalkowski
fijall at gmail.com
Wed Mar 19 17:27:00 CET 2014
More information about the Python-Dev mailing list
Wed Mar 19 17:27:00 CET 2014
- Previous message: [Python-Dev] Intricacies of calling __eq__
- Next message: [Python-Dev] Issues about relative& absolute import way for Porting from python2.4 to python2.7
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Wed, Mar 19, 2014 at 3:26 PM, Antoine Pitrou <solipsis at pitrou.net> wrote: > On Wed, 19 Mar 2014 15:21:16 +0200 > Maciej Fijalkowski <fijall at gmail.com> wrote: > >> 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? > > What do you mean? > I mean that dict starts with "is" before calling __eq__, so the number of calls to __eq__ can as well be zero.
- Previous message: [Python-Dev] Intricacies of calling __eq__
- Next message: [Python-Dev] Issues about relative& absolute import way for Porting from python2.4 to python2.7
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-Dev mailing list