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/2016-June/145168.html below:

[Python-Dev] Why does base64 return bytes?

[Python-Dev] Why does base64 return bytes? [Python-Dev] Why does base64 return bytes?Joao S. O. Bueno jsbueno at python.org.br
Tue Jun 14 11:29:25 EDT 2016
On 14 June 2016 at 12:19, Steven D'Aprano <steve at pearwood.info> wrote:
> Is there
> a good reason for returning bytes?

What about: it returns 0-255 numeric values for each position in  a stream, with
no clue whatsoever to how those values map to text characters beyond
the 32-128 range?

Maybe base64.decode could take a "encoding" optional parameter - or
there could  be
a separate 'decote_to_text" method that would explicitly take a text codec name.
Otherwise, no, you simply can't take a bunch of bytes and say they
represent text.

João

(see ^- the "ã" ?)
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