Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
docs: use 'recursively' in the description of rglob, and mention glob…
…s in the os equivalences
  • Loading branch information
nedbat committed Jul 18, 2022
commit 2ea9c203f7afbcc8fe2e592840d2442832298f55
5 changes: 3 additions & 2 deletions Doc/library/pathlib.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1122,8 +1122,8 @@ call fails (for example because the path doesn't exist).

.. method:: Path.rglob(pattern)

This is like calling :func:`Path.glob` with "``**/``" added in front of the
given relative *pattern*::
Glob the given relative *pattern* recursively. This is like calling
:func:`Path.glob` with "``**/``" added in front of the *pattern*::

>>> sorted(Path().rglob("*.py"))
[PosixPath('build/lib/pathlib.py'),
Expand Down Expand Up @@ -1302,6 +1302,7 @@ Below is a table mapping various :mod:`os` functions to their corresponding
:func:`os.path.samefile` :meth:`Path.samefile`
:func:`os.path.splitext` :data:`PurePath.stem` and
:data:`PurePath.suffix`
:func:`os.walk` :meth:`Path.glob` and :meth:`Path.rglob`
Comment thread
brettcannon marked this conversation as resolved.
Outdated
==================================== ==============================

.. rubric:: Footnotes
Expand Down