[Python-Dev] Why does base64 return bytes?
Anders J. Munch
andersjm at stofanet.dk
Wed Jun 15 16:42:09 EDT 2016
> Finding out whether users/projects typically write such a helper
> function for themselves would be a better way of getting this
> information. Personally, I suspect they don't, but facts beat
Well, I did. It was necessary to get 2to3 conversion to work(*). I turned every
into helper function calls that for Python 3 did:
(Or something similar, I don't have the code in front of me.)
Leaving out .decode/.encode('ascii') would simply not have worked. That would
just be asking for TypeError's.
(*) Yes, I use 2to3, believe it or not. Maintaining Python 2 code and doing an
automated conversion to Python 3 as needed.
More information about the Python-Dev