diff options
author | Petri Lehtinen <petri@digip.org> | 2013-02-23 18:55:36 (GMT) |
---|---|---|
committer | Petri Lehtinen <petri@digip.org> | 2013-02-23 18:55:36 (GMT) |
commit | e2c114733b1c9dc3a78c6723934e523e5260e156 (patch) | |
tree | fc83ba9fab260e8c4be27beb79f373e24aacce55 /Lib | |
parent | 3c75a48c860e81063c8034e9929ad092b43677ef (diff) | |
parent | ee4a20bad61b9315bb28e0162eefd7f0da110499 (diff) | |
download | cpython-e2c114733b1c9dc3a78c6723934e523e5260e156.zip cpython-e2c114733b1c9dc3a78c6723934e523e5260e156.tar.gz cpython-e2c114733b1c9dc3a78c6723934e523e5260e156.tar.bz2 |
Issue #16695: Document how glob handles filenames starting with a dot
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/glob.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/Lib/glob.py b/Lib/glob.py index f16e8e1..1f60265 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): |