> 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 > unicode_literals". 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. _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com