A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2001-June/015270.html below:

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

[Python-Dev] Shouldn't I be able to print Unicode objects? [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}"                 
u'\xb0'

is really an option.

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

Cheers,
M.

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




RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4