Skip to content

Commit bce76ba

Browse files
FFY00python-sidebar
authored andcommitted
pythonGH-99818: improve the documentation for zipfile.Path and Traversable (pythonGH-101589)
Automerge-Triggered-By: GH:FFY00
1 parent 12d27d8 commit bce76ba

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

Doc/library/importlib.resources.abc.rst

+4-1
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,12 @@
8989

9090
.. class:: Traversable
9191

92-
An object with a subset of pathlib.Path methods suitable for
92+
An object with a subset of :class:`pathlib.Path` methods suitable for
9393
traversing directories and opening files.
9494

95+
For a representation of the object on the file-system, use
96+
:meth:`importlib.resources.as_file`.
97+
9598
.. versionadded:: 3.9
9699

97100
.. deprecated-removed:: 3.12 3.14

Doc/library/zipfile.rst

+3-2
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,9 @@ The module defines the following items:
5555
.. class:: Path
5656
:noindex:
5757

58-
A pathlib-compatible wrapper for zip files. See section
59-
:ref:`path-objects` for details.
58+
Class that implements a subset of the interface provided by
59+
:class:`pathlib.Path`, including the full
60+
:class:`importlib.resources.abc.Traversable` interface.
6061

6162
.. versionadded:: 3.8
6263

0 commit comments

Comments
 (0)