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