-
-
Notifications
You must be signed in to change notification settings - Fork 31.4k
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
GH-101112: Provide pattern overview for Path.glob
#101223
Conversation
9365d78
to
8510576
Compare
Path.glob
Thanks for the PR, this will be very helpful. The table isn't quite right:
|
55b0bb1
to
23b12d4
Compare
@barneygale Thanks for catching. I copied the fnmatch table for the layout and missed to update it with the information you provided. Sorry for that. |
7062317
to
ab1f568
Compare
@barneygale Thanks for being patient and driving me through this PR. I applied your requested changes, but I think I am a bit lost regarding the fine details. I probably misinterpreted your comment in #101112 (comment) where you mentioned that that fnmatch reference is not correct. I am happy to further update this PR, but feel free to directly push to it if you see anything to be improved to get this PR moved forwards. Thanks a lot for your time! |
Provide an overview of available patterns for `Path.glob` and reference it from `Path.rglob` and `Path.match`. Co-authored-by: Barney Gale <barney.gale@gmail.com>
ab1f568
to
6fc4c85
Compare
Match this path against the provided glob-style pattern. Return ``True`` | ||
if matching is successful, ``False`` otherwise. | ||
Match this path against the provided glob-style pattern. The pattern uses | ||
the same format as in :func:`Path.glob`. Return ``True`` if matching is |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the same format as in :func:`Path.glob`. Return ``True`` if matching is | |
the same format as in :meth:`Path.glob`. Return ``True`` if matching is |
@@ -1331,8 +1348,7 @@ call fails (for example because the path doesn't exist). | |||
.. method:: Path.rglob(pattern, *, case_sensitive=None, follow_symlinks=None) | |||
|
|||
Glob the given relative *pattern* recursively. This is like calling | |||
:func:`Path.glob` with "``**/``" added in front of the *pattern*, where | |||
*patterns* are the same as for :mod:`fnmatch`:: | |||
:func:`Path.glob` with "``**/``" added in front of the *pattern*:: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:func:`Path.glob` with "``**/``" added in front of the *pattern*:: | |
:meth:`~Path.glob` with "``**/``" added in front of the *pattern*:: |
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
Sorry for the long delay. |
Issue was fixed in #114030, so I'm closing this PR. Thanks all the same. |
Provide an overview of available patterns for
Path.glob
and reference it fromPath.rglob
andPath.match
.Path.rglob
-> documentation does not specify whatpattern
is #101112