@@ -50,10 +50,10 @@ Also note that :func:`functools.lru_cache` with the *maxsize* of 32768 is used t
50
50
cache the compiled regex patterns in the following functions: :func: `fnmatch `,
51
51
:func: `fnmatchcase `, :func: `.filter `.
52
52
53
- .. function :: fnmatch(filename, pattern )
53
+ .. function :: fnmatch(name, pat )
54
54
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
57
57
using :func: `os.path.normcase `. :func: `fnmatchcase ` can be used to perform a
58
58
case-sensitive comparison, regardless of whether that's standard for the
59
59
operating system.
@@ -69,22 +69,24 @@ cache the compiled regex patterns in the following functions: :func:`fnmatch`,
69
69
print(file)
70
70
71
71
72
- .. function :: fnmatchcase(filename, pattern )
72
+ .. function :: fnmatchcase(name, pat )
73
73
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 `.
77
77
78
78
79
- .. function :: filter(names, pattern )
79
+ .. function :: filter(names, pat )
80
80
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.
83
85
84
86
85
- .. function :: translate(pattern )
87
+ .. function :: translate(pat )
86
88
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
88
90
using with :func: `re.match `.
89
91
90
92
Example:
0 commit comments