Skip to content

Commit

Permalink
gh-88546: glob.glob docs: Make new paragraph for emphasis and reorder…
Browse files Browse the repository at this point in the history
…ed sentence (GH-91614)

(cherry picked from commit b9ab6ce)

Co-authored-by: slateny <46876382+slateny@users.noreply.github.com>
  • Loading branch information
miss-islington and slateny committed May 2, 2022
1 parent 9941640 commit 446cc03
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Doc/library/glob.rst
Expand Up @@ -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`.)

Expand Down

0 comments on commit 446cc03

Please sign in to comment.