[issue3078] tokenize.py improvements

Raymond Hettinger report at bugs.python.org
Tue Jun 17 15:56:35 CEST 2008


Raymond Hettinger <rhettinger at users.sourceforge.net> added the comment:

Sorry, I don't see any value in this kind of patch.

The line "contline = += line"  is broken. The "+=" transformations and 
else-clause eliminations trivially re-arrange code without any real 
savings.  The "while 1" to "while True" transformation should not be 
done in Py2.x because the latter is much slower ("while True" requires 
loading a global variable and a test; in contrast, "while 1" is 
optimized to an unconditional jump.

----------
nosy: +rhettinger
resolution:  -> rejected
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue3078>
_______________________________________


More information about the Python-bugs-list mailing list