A RetroSearch Logo

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

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2000-May/003972.html below:

[Python-Dev] Unicode debate

[Python-Dev] Unicode debateKa-Ping Yee ping@lfw.org
Fri, 5 May 2000 02:21:20 -0700 (PDT)
On Thu, 4 May 2000, Fredrik Lundh wrote:
> 
> another approach is (simplified):
> 
>     try:
>         sys.stdout.write(x.encode(sys.stdout.encoding))
>     except AttributeError:
>         sys.stdout.write(str(x))

Indeed, that would work to solve just this specific Unicode
issue -- but there is a lot of flexibility and power to be
gained from the general solution of putting a method on the
stream object, as the example with the formatted list items
showed.  I think it is a good idea, for instance, to leave
decisions about how to print Unicode up to the Unicode object,
and not hardcode bits of it into print.

Guido, have you digested my earlier 'printout' suggestions?


-- ?!ng

"Old code doesn't die -- it just smells that way."
    -- Bill Frantz




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