summaryrefslogtreecommitdiffstats
path: root/Doc/library/zipfile.rst
diff options
context:
space:
mode:
authorR David Murray <rdmurray@bitdance.com>2012-08-15 15:11:27 (GMT)
committerR David Murray <rdmurray@bitdance.com>2012-08-15 15:11:27 (GMT)
commit27bbcfb8ff55ed2c57042bf72eb2ba01ec7e4169 (patch)
treed4a7886a29e92e4811c1087086aa30e1c27eb586 /Doc/library/zipfile.rst
parent592df20efcc41d2448c8acc35b3b4f15aa5c0bf2 (diff)
parentee0a945ae4077d9e4ffdb77e247ed13265316897 (diff)
downloadcpython-27bbcfb8ff55ed2c57042bf72eb2ba01ec7e4169.zip
cpython-27bbcfb8ff55ed2c57042bf72eb2ba01ec7e4169.tar.gz
cpython-27bbcfb8ff55ed2c57042bf72eb2ba01ec7e4169.tar.bz2
Merge #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.rst16
1 files changed, 10 insertions, 6 deletions
diff --git a/Doc/library/zipfile.rst b/Doc/library/zipfile.rst
index 409de44..498a9cd 100644
--- a/Doc/library/zipfile.rst
+++ b/Doc/library/zipfile.rst
@@ -197,14 +197,18 @@ 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.
- Calling :meth:`open` on a closed ZipFile will raise a :exc:`RuntimeError`.
+ 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
+ :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::