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/2005-February/051660.html below:

[Python-Dev] Re: Prospective Peephole Transformation

[Python-Dev] Re: Prospective Peephole Transformation [Python-Dev] Re: Prospective Peephole TransformationPhillip J. Eby pje at telecommunity.com
Fri Feb 18 16:36:43 CET 2005
At 10:15 AM 2/18/05 -0500, Raymond Hettinger wrote:

>Only contains expressions are translated:
>
>     "if x in [1,2,3]"
>
>currently turns into:
>
>     "if x in (1,2,3)"
>
>and I'm proposing that it go one step further:
>
>     "if x in Seachset([1,2,3])"

ISTM that whenever I use a constant in-list like that, it's almost always 
with just a few (<4) items, so it doesn't seem worth the extra effort 
(especially disrupting the marshal module) just to squeeze out those extra 
two comparisons and replace them with a hashing operation.

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