[Python-Dev] Why can't I encode/decode base64 without importing a module?
Guido van Rossum
guido at python.org
Tue Apr 23 03:22:51 CEST 2013
--Guido van Rossum (sent from Android phone)
On Apr 22, 2013 6:09 PM, "R. David Murray" <rdmurray at bitdance.com> wrote:
> On Tue, 23 Apr 2013 11:16:20 +1200, Greg Ewing <
greg.ewing at canterbury.ac.nz> wrote:
> > Victor Stinner wrote:
> > > The last proposition is to add transform() and untransform() methods
> > > to bytes and str types. ... If I remember
> > > correctly, the missing point is how to define which types are
> > > supported by a codec
> > Also, for any given codec, which direction is "transform"
> > and which is "untransform"?
> You transform *into* the encoding, and untransform *out* of the encoding.
> Do you have an example where that would be ambiguous?
> > Also also, what's so special about base64 et al that they
> > deserve an ultra-special way of invoking them, instead of
> > having to import a class or function like you do for
> > *every* *other* piece of library functionality?
> You can ask the same question about all the other codecs. (And that
> question has indeed been asked in the past.)
Except for rot13. :-)
> (One answer is that they used to work in Python2...but the longer we go
> without restoring the functionality to Python3, the weaker that particular
> argument becomes.)
> Python-Dev mailing list
> Python-Dev at python.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-Dev