[Python-Dev] Why does base64 return bytes?

Steven D'Aprano steve at pearwood.info
Wed Jun 15 11:07:50 EDT 2016

On Wed, Jun 15, 2016 at 12:53:15PM +0000, Daniel Holth wrote:
> In that case could we just add a base64_text() method somewhere? Who would
> like to measure whether it would be a win?

Just call .decode('ascii') on the output of base64.b64encode. Not every 
one-liner needs to be a standard function.


More information about the Python-Dev mailing list