[Python-Dev] Why can't I encode/decode base64 without importing a module?

Antoine Pitrou solipsis at pitrou.net
Thu Apr 25 17:15:45 CEST 2013


Le Thu, 25 Apr 2013 09:55:26 -0400,
Tres Seaver <tseaver at palladion.com> a écrit :
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On 04/25/2013 01:43 AM, Antoine Pitrou wrote:
> > On Thu, 25 Apr 2013 04:19:36 +0200 Lennart Regebro
> > <regebro at gmail.com> wrote:
> >> On Thu, Apr 25, 2013 at 3:54 AM, Stephen J. Turnbull
> >> <stephen at xemacs.org> wrote:
> >>> RFC 4648 repeatedly refers to *characters*, without specifying an 
> >>> encoding for them.
> > [...]
> >> 
> >> Base64 is an encoding that transforms between 8-bit streams.
> > 
> > No, it isn't. What Stephen wrote above.
> 
> Stephen was incorrect:  the base64 standard is about encoding a binary
> stream (8-bit bites) onto another binary stream (6-bit bytes), but one
> which can be safely transmitted over a 7-bit-only medium.

So where does the RFC talk about "6-bit bytes" at all? Or did you just
invent it?




More information about the Python-Dev mailing list