From a09657e94edef6e3cc31af93076e2e4b74955bef Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Sat, 4 May 2013 20:18:34 +0200 Subject: [PATCH] Elaborate on bytes-like objects. --- Doc/glossary.rst | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Doc/glossary.rst b/Doc/glossary.rst index 0d02d1acfc8c..219a6caf2cec 100644 --- a/Doc/glossary.rst +++ b/Doc/glossary.rst @@ -79,7 +79,11 @@ Glossary bytes-like object An object that supports the :ref:`buffer protocol `, - 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 -- 2.47.3