[Python-Dev] Allowing u.encode() to return non-strings

M.-A. Lemburg mal at egenix.com
Wed Jun 30 04:02:01 EDT 2004

Bill Janssen wrote:
> I'd go further.  I'd introduce the notation
>     v = b"abc"
> which means that "v" has assigned to it an 8-bit "string" byte vector.
> Then, after a release or two, I'd make plain old
>     "foo"
> mean what
>     u"foo"
> means today, so that string literals are by default Unicode (modulo
> PEP 263).

This would be ideal indeed and it has been dreamed up early on
in 2000 when the whole Unicode thing happened.

The option -U was added to be able to test the standard lib
against such an approach. Unfortunately, many modules don't work
under such an assumption, so we are still far from being able to
make -U the default.

Meanwhile, it's best to always use Unicode for text data
and strings for everything else.

Marc-Andre Lemburg

Professional Python Services directly from the Source  (#1, Jun 30 2004)
 >>> Python/Zope Consulting and Support ...        http://www.egenix.com/
 >>> mxODBC.Zope.Database.Adapter ...             http://zope.egenix.com/
 >>> mxODBC, mxDateTime, mxTextTools ...        http://python.egenix.com/

::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::

More information about the Python-Dev mailing list