From 84fb531fc2323cf3196366c3d0fbc0f43df99045 Mon Sep 17 00:00:00 2001 From: "Miss Islington (bot)" <31488909+miss-islington@users.noreply.github.com> Date: Thu, 11 Apr 2024 19:44:46 +0200 Subject: [PATCH] [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 --- Doc/library/glob.rst | 8 ++++++++ 1 file changed, 8 insertions(+) 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 "``**``". -- 2.47.3