From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Thu, 11 Apr 2024 17:44:46 +0000 (+0200) Subject: [3.12] gh-104269: Document `glob.glob` duplicates when using multiple `**` patterns... X-Git-Tag: v3.12.4~250 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=84fb531fc2323cf3196366c3d0fbc0f43df99045;p=thirdparty%2FPython%2Fcpython.git [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 c06be6bbb8d138dde50c0a07cbd64496bee537c5) Co-authored-by: Tomas R --- diff --git a/Doc/library/glob.rst b/Doc/library/glob.rst index 0e4cfe7ebed7..293c2c4fed62 100644 --- a/Doc/library/glob.rst +++ b/Doc/library/glob.rst @@ -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 "``**``".