[Python-3000] Unicode and OS strings (original) (raw)
Greg Ewing greg.ewing at canterbury.ac.nz
Mon Sep 17 01:01:33 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 ]
Gregory P. Smith wrote:
argv is the C/C++ name for bytes, lets not confuse people.
C has never made a clear distinction between characters and bytes, using the type 'char' for both. It got away with it for the same reason that Python did until unicode came along. I'm pretty sure most people using argv in C thought of it as holding characters. Certainly I always did.
As far as I know, most other places in Python are going to deal with the changes by keeping the existing text APIs as returning text, e.g. open() gives you a text mode I/O object by default with an assumed encoding, and to get bytes you need to do something explicit (e.g. opening the file in binary mode).
I don't see why argv should be different.
-- Greg
- Previous message: [Python-3000] Unicode and OS strings
- Next message: [Python-3000] Unicode and OS strings
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]