Author vstinner
Recipients beazley, brotchie, vstinner
Date 2009-01-02.01:31:56
SpamBayes Score 0.00443653
Marked as misclassified No
Message-id <1230859918.89.0.470142978449.issue4769@psf.upfronthosting.co.za>
In-reply-to
Content
About quoted printable, there are two implementations:
 - binascii.a2b_qp() (Modules/binascii.c): C implementation, use 
PyArg_ParseTupleAndKeywords(args, kwargs, "s*|i", ...) to parse the 
data
 - quopri.decode() (Lib/quopri.py): Python implementation
   => quopri.decodestring() uses io.BytesIO() to parse the data

But quopri.decodestring() reuses binascii.a2b_qp() if the binascii 
module is present. So quopri.decodestring behaviour depends of the 
presence of binascii module...
 - binascii present: accept bytes or unicode
 - missing binascii: accept only bytes!

binascii.a2b_qp() encodes unicode string to UTF-8 bytes string.
History
Date User Action Args
2009-01-02 01:31:58vstinnersetrecipients: + vstinner, beazley, brotchie
2009-01-02 01:31:58vstinnersetmessageid: <1230859918.89.0.470142978449.issue4769@psf.upfronthosting.co.za>
2009-01-02 01:31:57vstinnerlinkissue4769 messages
2009-01-02 01:31:56vstinnercreate