[Python-Dev] other "magic strings" issues

Raymond Hettinger python at rcn.com
Fri Nov 7 14:04:51 EST 2003

> Ah gotcha.  I'd definitely want to retain ascii_letters, probably
> ascii_lowercase and ascii_uppercase, digits, hexdigits, octdigits,
> punctuation, printable, and whitespace

Other than possibly upper and lower, the rest should be skipped and left
for tests like isdigit().  The tests are faster than the usual linear
search style of:   if char in str.letters.


More information about the Python-Dev mailing list