diff options
author | Larry Hastings <larry@hastings.org> | 2015-04-13 15:30:56 (GMT) |
---|---|---|
committer | Larry Hastings <larry@hastings.org> | 2015-04-13 15:30:56 (GMT) |
commit | ab792ac704c40e331b094a6816ba5a16072a39bd (patch) | |
tree | 24a9122814660b82d109c4388f9270a95c9b05fe /Doc/glossary.rst | |
parent | 8d11ccceeb8bd2a18020f776c56b703ca39a5087 (diff) | |
download | cpython-ab792ac704c40e331b094a6816ba5a16072a39bd.zip cpython-ab792ac704c40e331b094a6816ba5a16072a39bd.tar.gz cpython-ab792ac704c40e331b094a6816ba5a16072a39bd.tar.bz2 |
Doc clarification / edification on the semantics of the 'w*' format unit.
Diffstat (limited to 'Doc/glossary.rst')
-rw-r--r-- | Doc/glossary.rst | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/Doc/glossary.rst b/Doc/glossary.rst index 578fd11..57c6ddd 100644 --- a/Doc/glossary.rst +++ b/Doc/glossary.rst @@ -88,10 +88,17 @@ Glossary bytes-like object An object that supports the :ref:`bufferobjects`, like :class:`bytes`, :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. + be used for various operations that work with binary data; these include + compression, saving to a binary file, and sending over a socket. + + Some operations need the binary data to be mutable. The documentation + often refers to these as "read-write bytes-like objects". Example + mutable buffer objects include :class:`bytearray` and a + :class:`memoryview` of a :class:`bytearray`. + Other operations require the binary data to be stored in + immutable objects ("read-only bytes-like objects"); examples + of these include :class:`bytes` and a :class:`memoryview` + of a :class:`bytes` object. bytecode Python source code is compiled into bytecode, the internal representation |