[Python-Dev] other "magic strings" issues

Thomas Heller theller at python.net
Fri Nov 7 15:16:42 EST 2003

Guido van Rossum <guido at python.org> writes:

> I *do* think that we don't need string.letters -- the only use for it
> I've seen is checking if a character is in that string, and
> c.isletter() is faster.  But if someone has a use case for it that
> isn't argued away, I'd be okay with seeing it reincarnated as a class
> attribute of str too.

But there are probably more useful combinations like

    string.letters + string.digits + "_"

than there should be isxxx() tests.


More information about the Python-Dev mailing list