]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.11] GH-99818: improve the documentation for zipfile.Path and Traversable (GH-10158...
authorShantanu <12621235+hauntsaninja@users.noreply.github.com>
Sat, 25 Feb 2023 23:42:30 +0000 (15:42 -0800)
committerGitHub <noreply@github.com>
Sat, 25 Feb 2023 23:42:30 +0000 (23:42 +0000)
Automerge-Triggered-By: GH:FFY00
(cherry picked from commit 84181c14040ed2befe7f1a55b4f560c80fa61154)

Co-authored-by: Filipe LaĆ­ns <lains@riseup.net>
Doc/library/importlib.resources.abc.rst
Doc/library/zipfile.rst

index a028537f3cb2e2c3266c9a9713dbe44bad78f756..4a563c8a5390d19b0b2c4ec380fefe32d0ba622a 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
 
     .. attribute:: name
index af1f26385553abaac373227b85505b2ae5ff4fa3..9ad0a979e498b6d88da9d473248e0f7ef24ab35b 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