Python 3.0 crashes displaying Unicode at interactive prompt

Paul Boddie paul at boddie.org.uk
Sun Dec 14 19:52:18 CET 2008


On 14 Des, 05:46, "Martin v. Löwis" <mar... at v.loewis.de> wrote:
>
> Yes. If you want a display that is guaranteed to work on your terminal,
> use the ascii() builtin function.

But shouldn't the production of an object's representation via repr be
a "safe" operation? That is, the operation should always produce a
result, regardless of environmental factors like the locale or
terminal's encoding support. If John were printing the object, it
would be a different matter, but he apparently just wants to see a
sequence of characters which represents the object.

Paul



More information about the Python-list mailing list