[Python-3000] Unicode and OS strings (original) (raw)
Greg Ewing greg.ewing at canterbury.ac.nz
Sat Sep 15 00:44:18 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 ]
Hagen Fürstenau wrote:
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.
It would be pretty disruptive to ask everyone to change their habit of thinking of sys.argv as a list of strings.
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.
-- Greg
- Previous message: [Python-3000] Unicode and OS strings
- Next message: [Python-3000] Unicode and OS strings
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]