April 22, 2013
4:29 a.m.
Hi everyone, Take a look at this question: http://stackoverflow.com/questions/16122435/python-3-how-do-i-use-bytes-to-b... 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.