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/2001-September/017524.html below:

[Python-Dev] why doesn't print pass unicode strings on to the file object?

[Python-Dev] why doesn't print pass unicode strings on to the file object? [Python-Dev] why doesn't print pass unicode strings on to the file object?Fredrik Lundh fredrik@pythonware.com
Tue, 18 Sep 2001 12:22:03 +0200
martin wrote:

> I guess not. If the codec.lookup return value is changed, then I can
> write
>
> encoder = codecs.lookup("latin-1").encode
>
> Without that, I have to write
>
> encoder = codecs.CodecInfo(codecs.lookup("latin-1")).encode

or you could make things more readable, and add explicit
get-functions for each property:

    encoder = codecs.getencoder("latin-1")

much easier to understand, especially for casual users
(cf. os.path.getsize etc)

</F>





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