[Python-Dev] Re: Prospective Peephole Transformation

Aahz aahz at pythoncraft.com
Sat Feb 19 16:11:46 CET 2005

On Sat, Feb 19, 2005, "Martin v. L?wis" wrote:
> Fredrik Lundh wrote:
>>I'd say that this explains why it would still make sense to let the code 
>>generator change
>>"x in (a, b, c)" to "x == a or x == b or x == c", as long as a, b, and c 
>>are all integers.
> How often does that happen in real code?

Dunno how often, but I was working on some code at my company yesterday
that did that -- we use a lot of ints to indicate options.
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

"The joy of coding Python should be in seeing short, concise, readable
classes that express a lot of action in a small amount of clear code -- 
not in reams of trivial code that bores the reader to death."  --GvR

More information about the Python-Dev mailing list