@@ -50,10 +50,10 @@ Also note that :func:`functools.lru_cache` with the *maxsize* of 32768 is used t
5050cache the compiled regex patterns in the following functions: :func: `fnmatch `,
5151:func: `fnmatchcase `, :func: `.filter `.
5252
53- .. function :: fnmatch(filename, pattern )
53+ .. function :: fnmatch(name, pat )
5454
55- Test whether the * filename * string matches the * pattern * string, returning
56- :const: ` True ` or :const: ` False `. Both parameters are case-normalized
55+ Test whether the filename string * name * matches the pattern string * pat *,
56+ returning `` True `` or `` False ` `. Both parameters are case-normalized
5757 using :func: `os.path.normcase `. :func: `fnmatchcase ` can be used to perform a
5858 case-sensitive comparison, regardless of whether that's standard for the
5959 operating system.
@@ -69,22 +69,24 @@ cache the compiled regex patterns in the following functions: :func:`fnmatch`,
6969 print(file)
7070
7171
72- .. function :: fnmatchcase(filename, pattern )
72+ .. function :: fnmatchcase(name, pat )
7373
74- Test whether * filename * matches * pattern *, returning :const: ` True ` or
75- :const: ` False `; the comparison is case-sensitive and does not apply
76- :func: `os.path.normcase `.
74+ Test whether the filename string * name * matches the pattern string * pat *,
75+ returning `` True `` or `` False ``;
76+ the comparison is case-sensitive and does not apply :func: `os.path.normcase `.
7777
7878
79- .. function :: filter(names, pattern )
79+ .. function :: filter(names, pat )
8080
81- Construct a list from those elements of the iterable *names * that match *pattern *. It is the same as
82- ``[n for n in names if fnmatch(n, pattern)] ``, but implemented more efficiently.
81+ Construct a list from those elements of the :term: `iterable ` *names *
82+ that match pattern *pat *.
83+ It is the same as ``[n for n in names if fnmatch(n, pat)] ``,
84+ but implemented more efficiently.
8385
8486
85- .. function :: translate(pattern )
87+ .. function :: translate(pat )
8688
87- Return the shell-style * pattern * converted to a regular expression for
89+ Return the shell-style pattern * pat * converted to a regular expression for
8890 using with :func: `re.match `.
8991
9092 Example:
0 commit comments