Guido van Rossum wrote: > But shouldnt' this work just as well if it's only for encoding names > (which I'd hope would be ASCII themselves): > > def ascii_lower(s): > return str(unicode(s).lower()) Certainly. Another implementation would be lower_map = string.maketrans(string.ascii_upper, string.ascii_lower) def ascii_lower(str): return str.translate(lower_map) > This seems more elegant than adding yet more methods to the str type. Ok. I'll fix it in this direction, then. There would be two copies of this function that I can see: One for the codecs (which uses tolower() in C code), and one in the email module. And yes, codec names must be pure ASCII. Regards, Martin
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4