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

Lennart Regebro regebro at gmail.com
Thu Apr 25 19:04:01 CEST 2013

On Thu, Apr 25, 2013 at 5:27 PM, Antoine Pitrou <solipsis at pitrou.net> wrote:
> Le Thu, 25 Apr 2013 15:34:45 +0200,
> Lennart Regebro <regebro at gmail.com> a écrit :
>> I don't agree that there is a significant difference between those
>> wordings in this context. The end result is the same: Things intended
>> to be handled/seen as textual should be unicode strings, things
>> intended for data exchange should be byte strings.
> I don't think this distinction is meaningful at all.

OK, then I think we have found the core of the problem, and the end of
the discussion (from my side, that is).

> In the end,
> everything is a byte string on a classical computer (including unicode
> strings displayed on your monitor, obviously).

Yes of course. Especially since my monitor is an output device. ;-)

> If you think the technicalities of an operation should never be hidden
> or abstracted away, then you're better off with C than Python ;-)

The whole point is that Python *does* abstract it away. It abstract
the internals of Unicode strings in such a way that they are no
longer, conceptually, 8-bit data. This *is* a distinction Python does,
and it is a useful distinction. I do not see any reason to remove it.



More information about the Python-Dev mailing list