A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2013-April/125420.html below:

[Python-Dev] Why can't I encode/decode base64 without importing a module?

[Python-Dev] Why can't I encode/decode base64 without importing a module? [Python-Dev] Why can't I encode/decode base64 without importing a module?Ram Rachum ram at rachum.com
Mon Apr 22 13:29:23 CEST 2013
Hi everyone,

Take a look at this question:

http://stackoverflow.com/questions/16122435/python-3-how-do-i-use-bytes-to-bytes-and-string-to-string-encodings/16122472?noredirect=1#comment23034787_16122472

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>
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4