Skip to content

Commit 84fb531

Browse files
[3.12] gh-104269: Document glob.glob duplicates when using multiple ** patterns (GH-105406) (#117757)
gh-104269: Document `glob.glob` duplicates when using multiple `**` patterns (GH-105406) (cherry picked from commit c06be6b) Co-authored-by: Tomas R <[email protected]>
1 parent a3f1e98 commit 84fb531

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Doc/library/glob.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,10 @@ For example, ``'[?]'`` matches the character ``'?'``.
7777
Using the "``**``" pattern in large directory trees may consume
7878
an inordinate amount of time.
7979

80+
.. note::
81+
This function may return duplicate path names if *pathname*
82+
contains multiple "``**``" patterns and *recursive* is true.
83+
8084
.. versionchanged:: 3.5
8185
Support for recursive globs using "``**``".
8286

@@ -96,6 +100,10 @@ For example, ``'[?]'`` matches the character ``'?'``.
96100
.. audit-event:: glob.glob pathname,recursive glob.iglob
97101
.. audit-event:: glob.glob/2 pathname,recursive,root_dir,dir_fd glob.iglob
98102

103+
.. note::
104+
This function may return duplicate path names if *pathname*
105+
contains multiple "``**``" patterns and *recursive* is true.
106+
99107
.. versionchanged:: 3.5
100108
Support for recursive globs using "``**``".
101109

0 commit comments

Comments
 (0)