[Python-Dev] Why does base64 return bytes? (original) (raw)
Steven D'Aprano steve at pearwood.info
Wed Jun 15 11:07:50 EDT 2016
- Previous message (by thread): [Python-Dev] Why does base64 return bytes?
- Next message (by thread): [Python-Dev] Why does base64 return bytes?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Wed, Jun 15, 2016 at 12:53:15PM +0000, Daniel Holth wrote:
In that case could we just add a base64text() 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.
-- Steve
- Previous message (by thread): [Python-Dev] Why does base64 return bytes?
- Next message (by thread): [Python-Dev] Why does base64 return bytes?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]