Skip to content

Commit

Permalink
[3.12] gh-104269: Document glob.glob duplicates when using multiple…
Browse files Browse the repository at this point in the history
… `**` 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 <tomas.roun8@gmail.com>
  • Loading branch information
miss-islington and tomasr8 authored Apr 11, 2024
1 parent a3f1e98 commit 84fb531
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Doc/library/glob.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 "``**``".

Expand All @@ -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 "``**``".

Expand Down

0 comments on commit 84fb531

Please sign in to comment.