changeset: 6294:3fb0f9a0b195 user: Guido van Rossum date: Sun Apr 24 17:55:04 2016 -0700 files: pep-0484.txt description: Rip out the promotion from bytearray/memoryview to bytes. See http://bugs.python.org/issue26800. diff -r b79086c6626f -r 3fb0f9a0b195 pep-0484.txt --- a/pep-0484.txt Sat Apr 23 09:04:27 2016 -0700 +++ b/pep-0484.txt Sun Apr 24 17:55:04 2016 -0700 @@ -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 ------------------