[Python-Dev] other "magic strings" issues
Alex Martelli
aleaxit at yahoo.com
Mon Nov 10 03:18:15 EST 2003
On Sunday 09 November 2003 11:54 pm, Delaney, Timothy C (Timothy) wrote:
...
> ascii_letters = sets.Set(ascii_letters)
>
> Hmm - we'd have the iterability, individual characters and speed, but lose
> iterating in order. I'm sure there's things out there that rely on
> iterating over ascii_letters in order ... ;)
Yes, that's my main use case -- presenting results to the user, so they need
to be in alphabetic order (ascii_lowercase actually, but it's much the same).
Anyway, Guido has already pronounced on such enhancements as "Too
Clever", so we have to keep ascii_lowercase &c as plain strings without any
enhancements and keep the "false positives" &c on 'in' checks.
Alex
More information about the Python-Dev
mailing list