]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.12] gh-104269: Document `glob.glob` duplicates when using multiple `**` patterns...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Thu, 11 Apr 2024 17:44:46 +0000 (19:44 +0200)
committerGitHub <noreply@github.com>
Thu, 11 Apr 2024 17:44:46 +0000 (18:44 +0100)
gh-104269: Document `glob.glob` duplicates when using multiple `**` patterns (GH-105406)
(cherry picked from commit c06be6bbb8d138dde50c0a07cbd64496bee537c5)

Co-authored-by: Tomas R <tomas.roun8@gmail.com>
Doc/library/glob.rst

index 0e4cfe7ebed797c09fc6d10c990423eec4ed2308..293c2c4fed62fdbd15a4415a6d792fe73a528098 100644 (file)
@@ -77,6 +77,10 @@ For example, ``'[?]'`` matches the character ``'?'``.
       Using the "``**``" pattern in large directory trees may consume
       an inordinate amount of time.
 
+   .. note::
+      This function may return duplicate path names if *pathname*
+      contains multiple "``**``" patterns and *recursive* is true.
+
    .. versionchanged:: 3.5
       Support for recursive globs using "``**``".
 
@@ -96,6 +100,10 @@ For example, ``'[?]'`` matches the character ``'?'``.
    .. audit-event:: glob.glob pathname,recursive glob.iglob
    .. audit-event:: glob.glob/2 pathname,recursive,root_dir,dir_fd glob.iglob
 
+   .. note::
+      This function may return duplicate path names if *pathname*
+      contains multiple "``**``" patterns and *recursive* is true.
+
    .. versionchanged:: 3.5
       Support for recursive globs using "``**``".