Hacker News new | ask | show | jobs
by eevee 3928 days ago
fwiw:

    >>> codecs.encode(b'Python', 'base64')
    b'UHl0aG9u\n'
The encodings still exist; hex works too (or hex_codec in older Python 3s). Python 3 just restricted the encode/decode methods to always go str to bytes or bytes to str.