summaryrefslogtreecommitdiffstats
path: root/Doc/glossary.rst
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2017-03-12 08:05:05 (GMT)
committerGitHub <noreply@github.com>2017-03-12 08:05:05 (GMT)
commit4652d82a51e6530a4f820588a6209d3295963bdb (patch)
tree6d7055b6c65e2c0adf804f28e95e684d6ce69968 /Doc/glossary.rst
parent2f386254e2cf054cc7ee5103b54c1cf16d9fa979 (diff)
downloadcpython-4652d82a51e6530a4f820588a6209d3295963bdb.zip
cpython-4652d82a51e6530a4f820588a6209d3295963bdb.tar.gz
cpython-4652d82a51e6530a4f820588a6209d3295963bdb.tar.bz2
bpo-29746: Update marshal docs to Python 3. (#547) (#631)
(cherry picked from commit c611a5b1d4fab0123bf622f06c3bfa510221dc32)
Diffstat (limited to 'Doc/glossary.rst')
-rw-r--r--Doc/glossary.rst7
1 files changed, 7 insertions, 0 deletions
diff --git a/Doc/glossary.rst b/Doc/glossary.rst
index e07ab0d..495934a 100644
--- a/Doc/glossary.rst
+++ b/Doc/glossary.rst
@@ -131,6 +131,10 @@ Glossary
binary file
A :term:`file object` able to read and write
:term:`bytes-like objects <bytes-like object>`.
+ Examples of binary files are files opened in binary mode (``'rb'``,
+ ``'wb'`` or ``'rb+'``), :data:`sys.stdin.buffer`,
+ :data:`sys.stdout.buffer`, and instances of :class:`io.BytesIO` and
+ :class:`gzip.GzipFile`.
.. seealso::
A :term:`text file` reads and writes :class:`str` objects.
@@ -966,6 +970,9 @@ Glossary
A :term:`file object` able to read and write :class:`str` objects.
Often, a text file actually accesses a byte-oriented datastream
and handles the :term:`text encoding` automatically.
+ Examples of text files are files opened in text mode (``'r'`` or ``'w'``),
+ :data:`sys.stdin`, :data:`sys.stdout`, and instances of
+ :class:`io.StringIO`.
.. seealso::
A :term:`binary file` reads and write :class:`bytes` objects.