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

M.-A. Lemburg mal at lemburg.com
Mon Apr 3 13:48:05 CEST 2000


Andreas Jung wrote:
> 
> On Sat, Apr 01, 2000 at 12:00:00PM -0500, Guido van Rossum wrote:

The above line has all the answers ;-) ...

> > 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.

-- 
Marc-Andre Lemburg
______________________________________________________________________
Business:                                      http://www.lemburg.com/
Python Pages:                           http://www.lemburg.com/python/




More information about the Python-list mailing list