>>What about smtplib or smtpd?
>
>Yes, they should use bytes, 

I agree. imaplib, poplib and smtplib are wire protocols, and should be
8-bit clean (SMTP in particular). The APIs are little more than the wire
protocol, so I think it's apprioriate they present bytes to their users
also (and there is nothing in their respective RFC's about encoding).

>as should the email package.  

That's a tricker case, but I think it should use bytes internally. One of
the early goals of email was that be able to cope with malformed MIME -
this includes incorrectly encoded messages. So I think it must keep a
bytes representation internally.

However - charset encoding is part of the MIME spec, so users have a
reasonable expectation that the mime lib will present them with unicode.
So the API needs to be unicode.

>The latter doesn't though, and it needs a lot of work (we tried and failed
>at pycon).

Yes, it's hard. I think we're going to have to break the API.

-- 
Andrew McNamara, Senior Developer, Object Craft
http://www.object-craft.com.au/
_______________________________________________
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to