]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-104269: Document `glob.glob` duplicates when using multiple `**` patterns (#105406)
authorTomas R <tomas.roun8@gmail.com>
Thu, 11 Apr 2024 15:16:39 +0000 (17:16 +0200)
committerGitHub <noreply@github.com>
Thu, 11 Apr 2024 15:16:39 +0000 (15:16 +0000)
Doc/library/glob.rst

index 15fef747296ed4fe32ebd2145103833f94491409..ab6da98bc74ad22278020f187888423270fe38fb 100644 (file)
@@ -75,6 +75,10 @@ The :mod:`glob` module defines the following functions:
       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 "``**``".
 
@@ -94,6 +98,10 @@ The :mod:`glob` module defines the following functions:
    .. 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 "``**``".