]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.10] GH-99818: improve the documentation for zipfile.Path and Traversable (GH-10158...
authorShantanu <12621235+hauntsaninja@users.noreply.github.com>
Sat, 25 Feb 2023 23:40:55 +0000 (15:40 -0800)
committerGitHub <noreply@github.com>
Sat, 25 Feb 2023 23:40:55 +0000 (23:40 +0000)
Doc/library/importlib.rst
Doc/library/zipfile.rst

index 20305150d648a9f71cf2ae3d5cec28e05b614e43..21c1990346497201c8b4b6c41af724bf9aee763a 100644 (file)
@@ -809,9 +809,12 @@ ABC hierarchy::
 
 .. class:: Traversable
 
-    An object with a subset of pathlib.Path methods suitable for
+    An object with a subset of :class:`pathlib.Path` methods suitable for
     traversing directories and opening files.
 
+    For a representation of the object on the file-system, use
+    :meth:`importlib.resources.as_file`.
+
     .. versionadded:: 3.9
 
     .. abstractmethod:: name()
index eab1eaf4312d294202105d67813affe6feefda88..5072daa6335428309cb2092b44b17509c47cda23 100644 (file)
@@ -55,8 +55,9 @@ The module defines the following items:
 .. class:: Path
    :noindex:
 
-   A pathlib-compatible wrapper for zip files. See section
-   :ref:`path-objects` for details.
+   Class that implements a subset of the interface provided by
+   :class:`pathlib.Path`, including the full
+   :class:`importlib.resources.abc.Traversable` interface.
 
    .. versionadded:: 3.8