"M.-A. Lemburg" <mal@lemburg.com> writes:
4) I've had a long outstanding patch to add methods like isalpha() to string objects. The goal was to make sure that replacements exist for all the tools in the string module. The hold-up has been in making UniCode equivalents. If this is still wanted, I'll finish it up.
Hmm, Unicode object already have these methods...
I think Raymond is talking about methods *like* isalpha :-) See patch 562501, he wants ispunct, isgraph, isprint, isctrl, isxdigit, i.e. all ctype.h macros. Unicode objects don't support these, and the ctype.h macros aren't available for them.
I'd like to add another TODO to the list:
5) Add functions sys.setdefaultsourceencoding() and sys.getdefaultsourceencoding() which allow setting and querying the Python compiler's assumption about the default source code encoding (currently ASCII) much in the same way as sys.set/getdefaultencoding() work for the internal string encoding assumption.
This should not go into 2.3 (just as the other features shouldn't go there). I personally envision that this is solved in a different way: Instead of having a global setting, there should be a context-specific one, for use in eval/exec, and interactive mode. The "default" encoding for source code files should not be settable, and should remain at ASCII forever. Regards, Martin