summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslateny <46876382+slateny@users.noreply.github.com>2022-05-02 15:11:05 (GMT)
committerGitHub <noreply@github.com>2022-05-02 15:11:05 (GMT)
commitb9ab6cea0819bd498063f0934cb5bb0bb5a6a2d4 (patch)
tree416721ec1068f795edd6ba433bc6c3354df11d30
parentab616d323dbc473f8d5563b596e882ed3ccdf77b (diff)
downloadcpython-b9ab6cea0819bd498063f0934cb5bb0bb5a6a2d4.zip
cpython-b9ab6cea0819bd498063f0934cb5bb0bb5a6a2d4.tar.gz
cpython-b9ab6cea0819bd498063f0934cb5bb0bb5a6a2d4.tar.bz2
gh-88546: glob.glob docs: Make new paragraph for emphasis and reordered sentence (#91614)
-rw-r--r--Doc/library/glob.rst7
1 files changed, 5 insertions, 2 deletions
diff --git a/Doc/library/glob.rst b/Doc/library/glob.rst
index 54621d1..01ad677 100644
--- a/Doc/library/glob.rst
+++ b/Doc/library/glob.rst
@@ -23,8 +23,11 @@ according to the rules used by the Unix shell, although results are returned in
arbitrary order. No tilde expansion is done, but ``*``, ``?``, and character
ranges expressed with ``[]`` will be correctly matched. This is done by using
the :func:`os.scandir` and :func:`fnmatch.fnmatch` functions in concert, and
-not by actually invoking a subshell. Note that unlike :func:`fnmatch.fnmatch`,
-:mod:`glob` treats filenames beginning with a dot (``.``) as special cases.
+not by actually invoking a subshell.
+
+Note that files beginning with a dot (``.``) can only be matched by
+patterns that also start with a dot,
+unlike :func:`fnmatch.fnmatch` or :func:`pathlib.Path.glob`.
(For tilde and shell variable expansion, use :func:`os.path.expanduser` and
:func:`os.path.expandvars`.)