Author mdmullins
Recipients mdmullins, r.david.murray
Date 2010-01-07.04:30:25
SpamBayes Score 1.11022e-15
Marked as misclassified No
Message-id <1262838627.71.0.871070981315.issue7644@psf.upfronthosting.co.za>
In-reply-to
Content
"('crash' is for the interpreter crashing)"

Sorry.

     "Unless someone feels like creating an nntp test framework..."

This sounds like it is beyond me. But given the evidence, specifically the previous line:

     "file.write(line + b'\n')"

...the module is obviously writing as binary. I know that opening the files created by this method in 3.0 requires the 'rb' flag so it seems a safe bet. And I am actually using this module (as revised above) to get work done.

...

I apologise if this isn't the place for this (should I open another ticket?) but as a larger issue with 3.x in general, it was very confusing about when to use binary data and when to use strings when using nntplib. It took a lot of trial and error. If there was someway to make this more clear, or perhaps the methods themselves could be made flexible, excepting both types but always outputing in binary. (Liberal with input but conservative in output.) This would allow anyone working with nntplib to interact with the module in a completely binary way, understanding that all output will be explicitly binary, and that if strings are necessary, it's for the user to decode().

Just a thought.

MDMullins
History
Date User Action Args
2010-01-07 04:30:28mdmullinssetrecipients: + mdmullins, r.david.murray
2010-01-07 04:30:27mdmullinssetmessageid: <1262838627.71.0.871070981315.issue7644@psf.upfronthosting.co.za>
2010-01-07 04:30:26mdmullinslinkissue7644 messages
2010-01-07 04:30:25mdmullinscreate