[issue3159] glob.py improvements

Facundo Batista report at bugs.python.org
Fri Jul 11 04:44:02 CEST 2008


Facundo Batista <facundo at taniquetil.com.ar> added the comment:

If readability is enhanced is questionable, but is rejected on the basis
that cosmetic-only changes are not generally recommended: only
difficults following the code evolution in the repository.

The only change that I see regarding performance is the one involving
startswith, and it's actually wrong:

facundo at pomcat:~$ timeit.py -s "s='qwerty'" "s[0]=='q';s[0]=='x'"
1000000 loops, best of 3: 0.338 usec per loop
facundo at pomcat:~$ timeit.py -s "s='qwerty'"
"s.startswith('q');s.startswith('x')"
1000000 loops, best of 3: 0.854 usec per loop

Thanks anyway!

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

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


More information about the Python-bugs-list mailing list