Skip to content

Commit b9ab6ce

Browse files
authored
gh-88546: glob.glob docs: Make new paragraph for emphasis and reordered sentence (#91614)
1 parent ab616d3 commit b9ab6ce

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Doc/library/glob.rst

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,11 @@ according to the rules used by the Unix shell, although results are returned in
2323
arbitrary order. No tilde expansion is done, but ``*``, ``?``, and character
2424
ranges expressed with ``[]`` will be correctly matched. This is done by using
2525
the :func:`os.scandir` and :func:`fnmatch.fnmatch` functions in concert, and
26-
not by actually invoking a subshell. Note that unlike :func:`fnmatch.fnmatch`,
27-
:mod:`glob` treats filenames beginning with a dot (``.``) as special cases.
26+
not by actually invoking a subshell.
27+
28+
Note that files beginning with a dot (``.``) can only be matched by
29+
patterns that also start with a dot,
30+
unlike :func:`fnmatch.fnmatch` or :func:`pathlib.Path.glob`.
2831
(For tilde and shell variable expansion, use :func:`os.path.expanduser` and
2932
:func:`os.path.expandvars`.)
3033

0 commit comments

Comments
 (0)