Calling glob.glob(pattern, recursive=True), where pattern contains two or more **/ segments, can yield the same paths multiple times:
>>> import glob
>>> len(glob.glob('**/**', recursive=True))
314206
>>> len(set(glob.glob('**/**', recursive=True)))
44849
Linked PRs
Calling
glob.glob(pattern, recursive=True), where pattern contains two or more**/segments, can yield the same paths multiple times:Linked PRs
glob.globduplicates when using multiple**patterns #105406glob.globduplicates when using multiple**patterns (GH-105406) #117757