mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
Issue #16695: Document how glob handles filenames starting with a dot
This commit is contained in:
parent
0b785036ef
commit
2342784d28
3 changed files with 24 additions and 4 deletions
10
Lib/glob.py
10
Lib/glob.py
|
@ -18,7 +18,10 @@ __all__ = ["glob", "iglob"]
|
|||
def glob(pathname):
|
||||
"""Return a list of paths matching a pathname pattern.
|
||||
|
||||
The pattern may contain simple shell-style wildcards a la fnmatch.
|
||||
The pattern may contain simple shell-style wildcards a la
|
||||
fnmatch. However, unlike fnmatch, filenames starting with a
|
||||
dot are special cases that are not matched by '*' and '?'
|
||||
patterns.
|
||||
|
||||
"""
|
||||
return list(iglob(pathname))
|
||||
|
@ -26,7 +29,10 @@ def glob(pathname):
|
|||
def iglob(pathname):
|
||||
"""Return an iterator which yields the paths matching a pathname pattern.
|
||||
|
||||
The pattern may contain simple shell-style wildcards a la fnmatch.
|
||||
The pattern may contain simple shell-style wildcards a la
|
||||
fnmatch. However, unlike fnmatch, filenames starting with a
|
||||
dot are special cases that are not matched by '*' and '?'
|
||||
patterns.
|
||||
|
||||
"""
|
||||
if not has_magic(pathname):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue