[Python-Dev] Allowing u.encode() to return non-strings

M.-A. Lemburg mal at egenix.com
Thu Jun 24 04:42:13 EDT 2004


Martin v. Löwis wrote:
> M.-A. Lemburg wrote:
> 
>> I think those would cover 90% of all cases. For the remaining
>> cases we could add codecs.encode() and codecs.decode()
>> which then do allow arbitrary return types.
> 
> Can you give examples for the remaining cases?

A codec might want to return a buffer object, a mmapped
file, a home grown object, an array, a PIL Image object,
a WAV audio file object, etc. etc.

-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Source  (#1, Jun 24 2004)
 >>> Python/Zope Consulting and Support ...        http://www.egenix.com/
 >>> mxODBC.Zope.Database.Adapter ...             http://zope.egenix.com/
 >>> mxODBC, mxDateTime, mxTextTools ...        http://python.egenix.com/
________________________________________________________________________
IL Workshop @ Net.ObjectDays 2004, Erfurt, Germany          94 days left

::: Try mxODBC.Zope.DA for Windows,Linux,Solaris,FreeBSD for free ! ::::



More information about the Python-Dev mailing list