Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update docstrings and docs per recommendations.
  • Loading branch information
jaraco committed May 7, 2019
commit c8c151113c678005d9117ae3042842754f6d67d9
10 changes: 7 additions & 3 deletions Doc/library/zipfile.rst
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,10 @@ Path Objects
:class:`ZipFile` instance or ``file`` suitable for passing to
the :class:`ZipFile` constructor).

``at`` specifies the location of this Path within the zipfile,
e.g. 'dir/file.txt', 'dir/', or ''. Defaults to the empty string,
indicating the root.

Path objects expose the following features of :module:`pathlib.Path`
objects:

Expand All @@ -498,15 +502,15 @@ objects:

.. method:: Path.is_dir()

Return True if the current context references a directory.
Return ``True`` if the current context references a directory.

.. method:: Path.is_file()

Return True if the current context references a file.
Return ``True`` if the current context references a file.

.. method:: Path.exists()

Return True if the current context references a file or
Return ``True`` if the current context references a file or
directory in the zip file.

.. method:: Path.read_text(*, **)
Expand Down
3 changes: 3 additions & 0 deletions Lib/test/test_zipfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -2396,6 +2396,9 @@ def test_extract_command(self):


consume = tuple
Comment thread
jaraco marked this conversation as resolved.
"""
Poor man's technique to consume a (smallish) iterable.
"""


def add_dirs(zipfile):
Expand Down