diff options
author | Shantanu <12621235+hauntsaninja@users.noreply.github.com> | 2023-02-25 23:40:55 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-25 23:40:55 (GMT) |
commit | 4667c4dcdefb810bcde045db651c585c3bbc36bb (patch) | |
tree | 27f99e54895ed6de719b6c7a7196a74b83d88b2e | |
parent | d22a2cd422bde897531a50ce5bb9cfaf7a3bfc4e (diff) | |
download | cpython-4667c4dcdefb810bcde045db651c585c3bbc36bb.zip cpython-4667c4dcdefb810bcde045db651c585c3bbc36bb.tar.gz cpython-4667c4dcdefb810bcde045db651c585c3bbc36bb.tar.bz2 |
[3.10] GH-99818: improve the documentation for zipfile.Path and Traversable (GH-101589) (#102267)
-rw-r--r-- | Doc/library/importlib.rst | 5 | ||||
-rw-r--r-- | Doc/library/zipfile.rst | 5 |
2 files changed, 7 insertions, 3 deletions
diff --git a/Doc/library/importlib.rst b/Doc/library/importlib.rst index 2030515..21c1990 100644 --- a/Doc/library/importlib.rst +++ b/Doc/library/importlib.rst @@ -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() diff --git a/Doc/library/zipfile.rst b/Doc/library/zipfile.rst index eab1eaf..5072daa 100644 --- a/Doc/library/zipfile.rst +++ b/Doc/library/zipfile.rst @@ -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 |