[Python-Dev] Why can't I encode/decode base64 without importing a module? (original) (raw)
Ram Rachum ram at rachum.com
Mon Apr 22 13:29:23 CEST 2013
- Previous message: [Python-Dev] [Python-checkins] cpython: #11182: remove the unused and undocumented pydoc.Scanner class. Patch by
- Next message: [Python-Dev] Why can't I encode/decode base64 without importing a module?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi everyone,
Take a look at this question:
Is there really no way to use base64 that's as short as:
b'whatever'.encode('base64')
Because doing this:
import codecs
codecs.decode(b"whatever", "base64_codec")
Or this:
import base64
encoded = base64.b64encode(b'whatever')
Is cumbersome!
Why can't I do something like b'whatever'.encode('base64')? Or maybe using
a different method than encode
?
Thanks, Ram. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20130422/d3717b10/attachment.html>
- Previous message: [Python-Dev] [Python-checkins] cpython: #11182: remove the unused and undocumented pydoc.Scanner class. Patch by
- Next message: [Python-Dev] Why can't I encode/decode base64 without importing a module?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]