[docs] [issue25495] binascii documentation incorrect

R. David Murray report at bugs.python.org
Tue Oct 27 20:52:04 EDT 2015

R. David Murray added the comment:

I agree that the documentation is not optimal.  To give you some background, binascii was primarily implemented to support the email module, and the standard it is referring to is in fact the MIME standard that references base64 (I believe at the time the independent base64 standard did not exist).  The number 57 is derived from the fact that 57 * 4/3 = 76; that is, input data of length 57 will result in an encoded line that is equal to the maximum recommended line length.  Thus in encoding an email the email package (originally, it no longer does this) passed the data in in 57 byte chunks and appended the resulting lines to the output buffer.

So, this documentation is historically correct, but no longer particularly useful.  Suggested improvements are welcome.  

This state of affairs exists because the binascii module doesn't really have a current maintainer. Someday I'd love to have enough time to pick it up, since I maintain email and it is still used by email (and could be used better, with some module improvements).

nosy: +r.david.murray

Python tracker <report at bugs.python.org>

More information about the docs mailing list