summaryrefslogtreecommitdiffstats
path: root/Doc/library/zipfile.rst
diff options
context:
space:
mode:
authorR David Murray <rdmurray@bitdance.com>2012-08-15 14:43:58 (GMT)
committerR David Murray <rdmurray@bitdance.com>2012-08-15 14:43:58 (GMT)
commit1b00f25bf99d9b7a5f307984f6467258de636d23 (patch)
tree18d19d268ea3a642be447d3f7041211dc40f9379 /Doc/library/zipfile.rst
parentf748a3773fd40dd91195fc2fef2cac2f973baaf8 (diff)
downloadcpython-1b00f25bf99d9b7a5f307984f6467258de636d23.zip
cpython-1b00f25bf99d9b7a5f307984f6467258de636d23.tar.gz
cpython-1b00f25bf99d9b7a5f307984f6467258de636d23.tar.bz2
#15543: glossary entry for and 'universal newlines', and links to it.
Patch by Chris Jerdonek.
Diffstat (limited to 'Doc/library/zipfile.rst')
-rw-r--r--Doc/library/zipfile.rst8
1 files changed, 6 insertions, 2 deletions
diff --git a/Doc/library/zipfile.rst b/Doc/library/zipfile.rst
index bcec134..4035a14 100644
--- a/Doc/library/zipfile.rst
+++ b/Doc/library/zipfile.rst
@@ -169,13 +169,17 @@ ZipFile Objects
Return a list of archive members by name.
+.. index::
+ single: universal newlines; zipfile.ZipFile.open method
+
.. method:: ZipFile.open(name, mode='r', pwd=None)
Extract a member from the archive as a file-like object (ZipExtFile). *name* is
the name of the file in the archive, or a :class:`ZipInfo` object. The *mode*
parameter, if included, must be one of the following: ``'r'`` (the default),
- ``'U'``, or ``'rU'``. Choosing ``'U'`` or ``'rU'`` will enable universal newline
- support in the read-only object. *pwd* is the password used for encrypted files.
+ ``'U'``, or ``'rU'``. Choosing ``'U'`` or ``'rU'`` will enable
+ :term:`universal newlines` support in the read-only object.
+ *pwd* is the password used for encrypted files.
Calling :meth:`open` on a closed ZipFile will raise a :exc:`RuntimeError`.
.. note::