]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
GH-99818: improve the documentation for zipfile.Path and Traversable (GH-101589)
authorFilipe Laíns <lains@riseup.net>
Mon, 20 Feb 2023 19:21:10 +0000 (19:21 +0000)
committerGitHub <noreply@github.com>
Mon, 20 Feb 2023 19:21:10 +0000 (11:21 -0800)
Automerge-Triggered-By: GH:FFY00
Doc/library/importlib.resources.abc.rst
Doc/library/zipfile.rst

index 7747e89a833c02a678fbe38e660573656bde06c2..2d0f137ffc7996d01372f33a4a9cf1fa93c57ec6 100644 (file)
 
 .. 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
 
     .. deprecated-removed:: 3.12 3.14
index 1c516723f04a3337ea2906fcec0e92b9e140b3fb..0195abc3a992c1bc5c587c053b3dafd0f83785b6 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