[Python-Dev] Divorcing str and unicode (no more implicit conversions).

Fredrik Lundh fredrik at pythonware.com
Mon Oct 3 18:42:07 CEST 2005

Josiah Carlson wrote:

> > > and isn't pure ASCII.
> >
> > How can you be sure that something that is /semantically textual/ will
> > always remain "pure ASCII" ? That's contradictory, unless your software
> > never goes out of the anglo-saxon world (and even...).
> Non-unicode text input widgets.  Works great.  Can be had with the ANSI
> wxPython installation.

You're both missing that Python is dynamically typed.  A single string source
doesn't have to return the same type of strings, as long as the objects it returns
are compatible with Python's string model and with each other.

Under the default encoding (and quite a few other encodings), that's true for
plain ascii strings and Unicode strings.  This is a good thing.


More information about the Python-Dev mailing list