Re:Key differences between Python 2.7.x and Python 3.x (2014)
by Mizza on Sunday May 07, 2017 @03:09PM
(#14286998)
From Wikipedia:
"Base64 is a group of similar binary-to-text encoding schemes that represent binary data in an ASCII string format by translating it into a radix-64 representation."
Binary. To. Text. As in - bytes in, text out. Come on now.
Re:Key differences between Python 2.7.x and Python 3.x (2014)
by SmirkingRevenge on Sunday May 07, 2017 @04:27PM
(#14287452)
Its intentional, in part because of all the mayhem caused by Python2's "free-spirited" view on whether a thing is bytes or text. And that "free-spirited" view caused A LOT of mayhem.
Python3 errs on the side of not converting bytes to strings or vice versa unless its an explicit conversion on the bytes/string object itself. And it is fan-fucking-tastic!
What corner case do you think python 3 is solving with the return type being a byte array? Surely you must have looked into it because clearly it isn't arbitrary ... Right?
>The whole purpose of B64 encoding is to make something string-safe
Guess again.