Issue 3159: glob.py improvements - Python tracker (original) (raw)
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@pomcat:$ timeit.py -s "s='qwerty'" "s[0]=='q';s[0]=='x'"
1000000 loops, best of 3: 0.338 usec per loop
facundo@pomcat:$ timeit.py -s "s='qwerty'"
"s.startswith('q');s.startswith('x')"
1000000 loops, best of 3: 0.854 usec per loop
Thanks anyway!