]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Elaborate on bytes-like objects.
authorAntoine Pitrou <solipsis@pitrou.net>
Sat, 4 May 2013 18:18:34 +0000 (20:18 +0200)
committerAntoine Pitrou <solipsis@pitrou.net>
Sat, 4 May 2013 18:18:34 +0000 (20:18 +0200)
Doc/glossary.rst

index 0d02d1acfc8c3d467d6eaaff97bb95267f831e6c..219a6caf2ceca92e17cbf601c6e6bf98b3c23b43 100644 (file)
@@ -79,7 +79,11 @@ Glossary
 
    bytes-like object
       An object that supports the :ref:`buffer protocol <bufferobjects>`,
-      like :class:`str` or :class:`bytearray`.
+      like :class:`str`, :class:`bytearray` or :class:`memoryview`.
+      Bytes-like objects can be used for various operations that expect
+      binary data, such as compression, saving to a binary file or sending
+      over a socket. Some operations need the binary data to be mutable,
+      in which case not all bytes-like objects can apply.
 
    bytecode
       Python source code is compiled into bytecode, the internal representation