[Python-3000] Unicode and OS strings (original) (raw)
Guido van Rossum guido at python.org
Sat Sep 15 01:22:25 CEST 2007
- Previous message: [Python-3000] Unicode and OS strings
- Next message: [Python-3000] Unicode and OS strings
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 9/14/07, Greg Ewing <greg.ewing at canterbury.ac.nz> wrote:
It would be pretty disruptive to ask everyone to change their habit of thinking of sys.argv as a list of strings.
Indeed.
I would suggest doing it the other way around -- have sys.argv be an object that automatically converts to unicode on access, and something else, such as sys.argbytes, for getting the raw bytes if that fails.
Great idea, but sys.argv doesn't need to be magic for this approach to work.
If course os.environ would have to be treated similarly.
And things like the strings returned by the _locale module (I found at least one test failing on Red Hat platforms because the thousands separator is set to \xa0 in the Estonian locale).
-- --Guido van Rossum (home page: http://www.python.org/~guido/)
- Previous message: [Python-3000] Unicode and OS strings
- Next message: [Python-3000] Unicode and OS strings
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]