[Python-Dev] Re: New Features in Python 1.6

Andreas Jung ajung@sz-sb.de
Mon, 3 Apr 2000 13:17:20 +0200


On Sat, Apr 01, 2000 at 12:00:00PM -0500, Guido van Rossum wrote:
> 
> Python strings can now be stored as Unicode strings.  To make it easier
> to type Unicode strings, the single-quote character defaults to creating
> a Unicode string, while the double-quote character defaults to ASCII
> strings.  If you need to create a Unicode string with double quotes,
> just preface it with the letter "u"; likewise, an ASCII string can be
> created by prefacing single quotes with the letter "a".  For example:
> 
>    foo = 'hello'                # Unicode
>    foo = "hello"                # ASCII

Is single-quoting for creating unicode clever ? I think there might be a problem
with old code when the operations on unicode strings are not 100% compatible to
the standard string operations. I don't know if this is a real problem - it's
just a point for discussion.

Cheers,
Andreas