Skip to content

Commit 61d30bc

Browse files
committed
gh-148765: Fix description of include_hidden parameter in glob docs
1 parent a8c9aa9 commit 61d30bc

2 files changed

Lines changed: 14 additions & 1 deletion

File tree

Doc/library/glob.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ The :mod:`!glob` module defines the following functions:
7070
pattern is followed by an :data:`os.sep` or :data:`os.altsep` then files will not
7171
match.
7272

73-
If *include_hidden* is true, "``**``" pattern will match hidden directories.
73+
If *include_hidden* is true, patterns that do not begin with a dot (``.``)
74+
may also match path components that begin with a dot.
7475

7576
.. audit-event:: glob.glob pathname,recursive glob.glob
7677
.. audit-event:: glob.glob/2 pathname,recursive,root_dir,dir_fd glob.glob
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
Fix inaccurate description of the *include_hidden* parameter in
2+
:func:`glob.glob` and :func:`glob.iglob`. The parameter allows all wildcard
3+
patterns to match path components beginning with a dot, not just ``**``
4+
matching "hidden directories" as previously stated.
5+
6+
#.. section: Tests #.. section: Build #.. section: Windows #.. section:
7+
macOS #.. section: IDLE #.. section: Tools/Demos #.. section: C API
8+
9+
# Write your Misc/NEWS.d entry below. It should be a simple ReST paragraph.
10+
# Don't start with "- Issue #<n>: " or "- gh-issue-<n>: " or that sort of
11+
stuff.
12+
###########################################################################

0 commit comments

Comments
 (0)