summaryrefslogtreecommitdiff
path: root/Lib/glob.py
diff options
context:
space:
mode:
authorPetri Lehtinen <petri@digip.org>2013-02-23 19:56:15 +0100
committerPetri Lehtinen <petri@digip.org>2013-02-23 19:56:15 +0100
commit1edd2473946cec3879a42c9d2635e31ac7b070a2 (patch)
treeecd02dfe58ce58676c8dcbb7aabc76c50befac43 /Lib/glob.py
parent47524c97290342c7fab5f4ded1f8875fb3526f49 (diff)
parent0bd7bafebca3509d1263d547d4b9e275c58e1eaf (diff)
downloadcpython-1edd2473946cec3879a42c9d2635e31ac7b070a2.tar.gz
Issue #16695: Document how glob handles filenames starting with a dot
Diffstat (limited to 'Lib/glob.py')
-rw-r--r--Lib/glob.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/Lib/glob.py b/Lib/glob.py
index c9f811720a..1a268a3ad1 100644
--- a/Lib/glob.py
+++ b/Lib/glob.py
@@ -9,7 +9,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))
@@ -17,7 +20,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):