[Python-Dev] other "magic strings" issues

Skip Montanaro skip at pobox.com
Mon Nov 10 12:16:34 EST 2003

    Tim> # inside string.py or equivalent ...

    Tim> import sets

    Tim> ascii_letters = sets.Set(ascii_letters)

    Tim> Hmm - we'd have the iterability, individual characters and speed,
    Tim> but lose iterating in order. I'm sure there's things out there that
    Tim> rely on iterating over ascii_letters in order ... ;)

Actually, I suspect that in most cases you wouldn't have speed unless
sets.Set() is rewritten in C.  See my previous post with the timeit.py


More information about the Python-Dev mailing list