[Python-Dev] Shouldn't I be able to print Unicode objects?

Michael Hudson mwh@python.net
05 Jun 2001 20:31:33 +0100

Skip Montanaro <skip@pobox.com> writes:

>     Me> [what am I missing?]
>     Michael> The encoding:
>     >>> print u"\N{DEGREE SIGN}".encode("latin1")
> Hmmm... I don't believe I've ever encountered an object in Python before
> that you couldn't simply print.  Are Unicode objects unique in this respect?
> Seems like a bug (or at least a feature) to me.

Well, what would you have 

>>> print u"\N{DEGREE SIGN}"

(or equivalently

str(u"\N{DEGREE SIGN}")

since we're eventually going to have to stuff an 8-bit string down
stdout) do?

I don't think

>>> print u"\N{DEGREE SIGN}"                 

is really an option.

This is old news.  It must have been discussed here before 1.6,
I'd have thought.


58. Fools ignore complexity. Pragmatists suffer it. Some can avoid
    it. Geniuses remove it.
  -- Alan Perlis, http://www.cs.yale.edu/homes/perlis-alan/quotes.html