[Python-Dev] Python in Unicode context
pinard at iro.umontreal.ca
Tue Aug 3 21:47:24 CEST 2004
> Martin v. Löwis wrote:
> Things that have been proposed earlier on, extended a bit:
> b'xxx' - return a buffer to hold binary data; same as buffer(s'abc')
> s'abc' - (forced) 8-bit string literal in source code encoding
> u'abc' - (forced) Unicode literal
I currently do not see the need of a fine distinction between `b' or
`s' as a prefix. `s' and `u' are the first letter of the type (`str' or
`unicode') and that makes them natural.
> 'abc' - maps to s'abc' per default, can map to u'abc' based on the
> command line switch -U or a module switch
The idea would be, indeed, to create some kind of per-module switch.
I'm less sure that `-U' is any useful in practice, as long as all of the
library does not become "Unicode-aware", whatever that would imply...
P.S. - Command line switch for command line switch :-), a switch for
fully turning on the newer type system would be more productive than
`-U', and put some pressure for refreshening the library in this area.
Just curious, as I do not intend to volunteer in this area, is there
something else than Exception in the Python internals that rely on
François Pinard http://www.iro.umontreal.ca/~pinard
More information about the Python-Dev