Skip to content

Commit 4667c4d

Browse files
authored
[3.10] GH-99818: improve the documentation for zipfile.Path and Traversable (GH-101589) (#102267)
1 parent d22a2cd commit 4667c4d

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

Doc/library/importlib.rst

+4-1
Original file line numberDiff line numberDiff line change
@@ -809,9 +809,12 @@ ABC hierarchy::
809809

810810
.. class:: Traversable
811811

812-
An object with a subset of pathlib.Path methods suitable for
812+
An object with a subset of :class:`pathlib.Path` methods suitable for
813813
traversing directories and opening files.
814814

815+
For a representation of the object on the file-system, use
816+
:meth:`importlib.resources.as_file`.
817+
815818
.. versionadded:: 3.9
816819

817820
.. abstractmethod:: name()

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)