[docs] Possible error

Blanca Mancilla blancalmancilla at gmail.com
Thu Jul 4 15:34:53 CEST 2013

I'm going through the documentation and came across the following error:

in http://docs.python.org/2.7/tutorial/interpreter.html, in the Source
Encoding Section, there is a program:

# -*- coding: iso-8859-15 -*-
currency = u"€"print ord(currency)

which presents a problem when running:

Traceback (most recent call last):
  File "encoding.py", line 6, in <module>
    print ord(currency)
TypeError: ord() expected a character, but string of length 3 found

but if I change the encoding to UTF-8 it works:

# -*- coding: UTF -*-

it give the desired results. Not sure if it is a real bug.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/docs/attachments/20130704/272e7298/attachment-0001.html>

More information about the docs mailing list