Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8c5d034 commit e8d2264Copy full SHA for e8d2264
2 files changed
Doc/library/fnmatch.rst
@@ -75,7 +75,7 @@ patterns.
75
76
.. function:: filter(names, pattern)
77
78
- Return the subset of the list of *names* that match *pattern*. It is the same as
+ Construct a list from those elements of the iterable *names* that match *pattern*. It is the same as
79
``[n for n in names if fnmatch(n, pattern)]``, but implemented more efficiently.
80
81
Lib/fnmatch.py
@@ -52,7 +52,7 @@ def _compile_pattern(pat):
52
return re.compile(res).match
53
54
def filter(names, pat):
55
- """Return the subset of the list NAMES that match PAT."""
+ """Construct a list from those elements of the iterable NAMES that match PAT."""
56
result = []
57
pat = os.path.normcase(pat)
58
match = _compile_pattern(pat)
0 commit comments