[Python-Dev] Dropping bytes "support" in json

Barry Warsaw barry at python.org
Fri Apr 10 04:29:12 CEST 2009

On Apr 9, 2009, at 11:08 AM, Bill Janssen wrote:

> Barry Warsaw <barry at python.org> wrote:
>> Anyway, aside from that decision, I haven't come up with an
>> elegant way to allow /output/ in both bytes and strings (input is I
>> think theoretically easier by sniffing the arguments).
> Probably a good thing.  It just promotes more confusion to do things
> that way, IMO.

Very possibly so.  But applications will definitely want stuff like  
the text/plain payload as a unicode, or the image/gif payload as a  
bytes (or even as a PIL image or whatever).

Not that I think the email package needs to know about every content  
type under the sun, but I do think that it should be pluggable so as  
to allow applications to more conveniently access the data that way.   
Possibly the defaults should be unicodes for any text/* type and bytes  
for everything else.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 304 bytes
Desc: This is a digitally signed message part
URL: <http://mail.python.org/pipermail/python-dev/attachments/20090409/74827d90/attachment.pgp>

More information about the Python-Dev mailing list