8000 GH-101112: Add "pattern language" section to pathlib docs by barneygale · Pull Request #114030 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

GH-101112: Add "pattern language" section to pathlib docs #114030

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 18 commits into from
Feb 26, 2024
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
Prev Previous commit
Next Next commit
Soften note about trailing slashes.
  • Loading branch information
barneygale committed Jan 30, 2024
commit 7caf2473d26c2facc8752de9f2b39118fdd23c4e
8 changes: 2 additions & 6 deletions Doc/library/pathlib.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1654,12 +1654,8 @@ Pattern Meaning
directories. In previous versions, only directories were returned.

In :meth:`Path.glob` and :meth:`~Path.rglob`, a trailing slash may be added to
the pattern to match only directories.

.. note::
This module normally removes trailing slashes. Paths returned from
:meth:`Path.glob` and :meth:`~Path.rglob` don't include any trailing slash
given in the pattern. :meth:`PurePath.full_match` ignores trailing slashes.
the pattern to match only directories. Like all :class:`Path` objects, the
returned directories do not have a trailing slash.

.. versionchanged:: 3.11
Globbing with a pattern that ends with a pathname components separator
Expand Down
0