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/2014-February/132696.html below:

[Python-Dev] PEP 461: Adding % formatting to bytes and bytearray -- Final, Take 2

[Python-Dev] PEP 461: Adding % formatting to bytes and bytearray -- Final, Take 2Ethan Furman ethan at stoneleaf.us
Sun Feb 23 03:30:03 CET 2014
Sorry, found a couple more comments in a different thread.  Here's what I added:

+Objections
+==========
+
+The objections raised against this PEP were mainly variations on two themes::
+
+  - the ``bytes`` and ``bytearray`` types are for pure binary data, with no
+    assumptions about encodings
+  - offering %-interpolation that assumes an ASCII encoding will be an
+    attractive nuisance and lead us back to the problems of the Python 2
+    ``str``/``unicode`` text model
+
+As was seen during the discussion, ``bytes`` and ``bytearray`` are also used
+for mixed binary data and ASCII-compatible segments: file formats such as
+``dbf`` and ``pdf``, network protocols such as ``ftp`` and ``email``, etc.
+
+``bytes`` and ``bytearray`` already have several methods which assume an ASCII
+compatible encoding.  ``upper()``, ``isalpha()``, and ``expandtabs()`` to name
+just a few.  %-interpolation, with its very restricted mini-language, will not
+be any more of a nuisance than the already existing methdods.
+
+
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