[Python-Dev] Rework nntplib?

R. David Murray rdmurray at bitdance.com
Mon Sep 20 04:25:36 CEST 2010

On Mon, 20 Sep 2010 06:55:50 +1000, Nick Coghlan <ncoghlan at gmail.com> wrote:
> On Mon, Sep 20, 2010 at 3:27 AM, Antoine Pitrou <solipsis at pitrou.net> wrote:
> >
> > For the record, the code is pretty much done now:
> > http://bugs.python.org/issue9360
> Generally looks pretty reasonable. As I noted on the issue, my one
> concern is that the current API seems to rely on the programmer
> remembering which methods return strings and which return bytes
> without any consistent mnemonic as to which is which.

The mnemonic is: *raw message data* is bytes, everything else is unicode.
That is, the *content* of head, body, article, post, and ihave commands
is bytes, otherwise you are dealing with strings.  I think it is a
very clear and obvious distinction, myself.


More information about the Python-Dev mailing list