Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(8)

Side by Side Diff: Doc/library/zipfile.rst

Issue 18758: Fix internal references in the documentation
Patch Set: Created 6 years, 6 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Doc/library/warnings.rst ('k') | Doc/whatsnew/3.4.rst » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 :mod:`zipfile` --- Work with ZIP archives 1 :mod:`zipfile` --- Work with ZIP archives
2 ========================================= 2 =========================================
3 3
4 .. module:: zipfile 4 .. module:: zipfile
5 :synopsis: Read and write ZIP-format archive files. 5 :synopsis: Read and write ZIP-format archive files.
6 .. moduleauthor:: James C. Ahlstrom <jim@interet.com> 6 .. moduleauthor:: James C. Ahlstrom <jim@interet.com>
7 .. sectionauthor:: James C. Ahlstrom <jim@interet.com> 7 .. sectionauthor:: James C. Ahlstrom <jim@interet.com>
8 8
9 **Source code:** :source:`Lib/zipfile.py` 9 **Source code:** :source:`Lib/zipfile.py`
10 10
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 is the name of the file in the archive, or a :class:`ZipInfo` object. The 206 is the name of the file in the archive, or a :class:`ZipInfo` object. The
207 *mode* parameter, if included, must be one of the following: ``'r'`` (the 207 *mode* parameter, if included, must be one of the following: ``'r'`` (the
208 default), ``'U'``, or ``'rU'``. Choosing ``'U'`` or ``'rU'`` will enable 208 default), ``'U'``, or ``'rU'``. Choosing ``'U'`` or ``'rU'`` will enable
209 :term:`universal newlines` support in the read-only object. *pwd* is the 209 :term:`universal newlines` support in the read-only object. *pwd* is the
210 password used for encrypted files. Calling :meth:`.open` on a closed 210 password used for encrypted files. Calling :meth:`.open` on a closed
211 ZipFile will raise a :exc:`RuntimeError`. 211 ZipFile will raise a :exc:`RuntimeError`.
212 212
213 .. note:: 213 .. note::
214 214
215 The file-like object is read-only and provides the following methods: 215 The file-like object is read-only and provides the following methods:
216 :meth:`!read`, :meth:`!readline`, :meth:`!readlines`, :meth:`!__iter__`, 216 :meth:`~io.BufferedIOBase.read`, :meth:`~io.IOBase.readline`,
217 :meth:`!__next__`. 217 :meth:`~io.IOBase.readlines`, :meth:`__iter__`,
218 :meth:`~iterator.__next__`.
218 219
219 .. note:: 220 .. note::
220 221
221 If the ZipFile was created by passing in a file-like object as the first 222 If the ZipFile was created by passing in a file-like object as the first
222 argument to the constructor, then the object returned by :meth:`.open` sha res the 223 argument to the constructor, then the object returned by :meth:`.open` sha res the
223 ZipFile's file pointer. Under these circumstances, the object returned b y 224 ZipFile's file pointer. Under these circumstances, the object returned b y
224 :meth:`.open` should not be used after any additional operations are perf ormed 225 :meth:`.open` should not be used after any additional operations are perf ormed
225 on the ZipFile object. If the ZipFile was created by passing in a string (the 226 on the ZipFile object. If the ZipFile was created by passing in a string (the
226 filename) as the first argument to the constructor, then :meth:`.open` wi ll 227 filename) as the first argument to the constructor, then :meth:`.open` wi ll
227 create a new file object that will be held by the ZipExtFile, allowing it to 228 create a new file object that will be held by the ZipExtFile, allowing it to
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
525 526
526 .. attribute:: ZipInfo.compress_size 527 .. attribute:: ZipInfo.compress_size
527 528
528 Size of the compressed data. 529 Size of the compressed data.
529 530
530 531
531 .. attribute:: ZipInfo.file_size 532 .. attribute:: ZipInfo.file_size
532 533
533 Size of the uncompressed file. 534 Size of the uncompressed file.
534 535
OLDNEW
« no previous file with comments | « Doc/library/warnings.rst ('k') | Doc/whatsnew/3.4.rst » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+