New Features in Python 1.6

Joachim Koenig-Baltes joachim at medien.tecmath.de
Tue Apr 4 05:28:37 EDT 2000


In comp.lang.python, you wrote:
>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 
>
Hallo Andreas,

hast Du mal auf das Datum des Beitrages von Guido geschaut? Echt guter April-
Scherz, da er die Scherze sehr gut mit der Realität mischt.

Liebe Grüße, auch an die anderen,

Joachim





More information about the Python-list mailing list