[Python-Dev] Problems with unicode_literals (original) (raw)
"Martin v. Löwis" martin at v.loewis.de
Sat Jan 17 20:41:36 CET 2009
- Previous message: [Python-Dev] Problems with unicode_literals
- Next message: [Python-Dev] Problems with unicode_literals
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
That seems a bit too strict to me, as long as the Unicode strings contain just ASCII. I'm fine with fixing both cases Barry mentioned, especially if it otherwise breaks "from future import unicodeliterals". I expect though that as one tries more things one will find more things broken with that mode.
Of course, the proposed patch would widen it to arbitrary Unicode command options; nothing in the patch restricts it to pure ASCII.
Even when only ASCII characters are used in the option name, we might still get encoding exceptions or warnings if a non-ASCII byte string (e.g. from the command line) happens to be compared with the option name (although I just now couldn't produce such a case).
Regards, Martin
P.S. optparse already defines a function isbasestring; it might be better to use that one instead.
- Previous message: [Python-Dev] Problems with unicode_literals
- Next message: [Python-Dev] Problems with unicode_literals
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]