On 9/14/07, Hagen Fürstenau <[EMAIL PROTECTED]> wrote: > Is it too unreasonable to keep the byte strings we get from the OS as > byte strings in Python (since we're not sure about their encoding) and > offer functions for getting strings?
> sys.argv could be of type bytes and sys.arguments (or whatever) could be > a function taking an encoding parameter (which defaults to UTF-8) and > returning strings. > Of course that's backwards incompatible and I'm not sure if it's too > late for something like this now. For that reason alone, it makes sense to do it the other way. sys.argv is the text string, and sys.arguments is a bytes object which can be decoded if you know the encoding. sys.argv == sys.arguments(best_guess) -jJ _______________________________________________ Python-3000 mailing list [email protected] http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com
