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-September/017530.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?M.-A. Lemburg mal@lemburg.com
Tue, 18 Sep 2001 15:53:18 +0200
Fredrik Lundh wrote:
> 
> 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)

+1

Funny, the C API provides APIs for this already ;-)

-- 
Marc-Andre Lemburg
CEO eGenix.com Software GmbH
______________________________________________________________________
Consulting & Company:                           http://www.egenix.com/
Python Software:                        http://www.lemburg.com/python/





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