[Python-checkins] peps: Rip out the promotion from bytearray/memoryview to bytes. See
guido.van.rossum
python-checkins at python.org
Sun Apr 24 20:55:13 EDT 2016
https://hg.python.org/peps/rev/3fb0f9a0b195
changeset: 6294:3fb0f9a0b195
user: Guido van Rossum <guido at python.org>
date: Sun Apr 24 17:55:04 2016 -0700
summary:
Rip out the promotion from bytearray/memoryview to bytes. See http://bugs.python.org/issue26800.
files:
pep-0484.txt | 20 --------------------
1 files changed, 0 insertions(+), 20 deletions(-)
diff --git a/pep-0484.txt b/pep-0484.txt
--- a/pep-0484.txt
+++ b/pep-0484.txt
@@ -722,26 +722,6 @@
exceedingly rare.
-The bytes types
----------------
-
-There are three different builtin classes used for arrays of bytes
-(not counting the classes available in the ``array`` module):
-``bytes``, ``bytearray`` and ``memoryview``. Of these, ``bytes`` and
-``bytearray`` have many behaviors in common (though not all --
-``bytearray`` is mutable).
-
-While there is an ABC ``ByteString`` defined in ``collections.abc``
-and a corresponding type in ``typing``, functions accepting bytes (of
-some form) are so common that it would be cumbersome to have to write
-``typing.ByteString`` everywhere. So, as a shortcut similar to that
-for the builtin numeric classes, when an argument is annotated as
-having type ``bytes``, arguments of type ``bytearray`` or
-``memoryview`` are acceptable. (Again, there are situations where
-this isn't sound, but we believe those are exceedingly rare in
-practice.)
-
-
Forward references
------------------
--
Repository URL: https://hg.python.org/peps
More information about the Python-checkins
mailing list