Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
09ba8333
Commit
09ba8333
authored
May 29, 2019
by
Tony Flury
Committed by
Miss Islington (bot)
May 28, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[2.7] bpo-33006 - Correct filter doc string to clarify 2nd argument can be iterable (GH-6015)
https://bugs.python.org/issue33006
parent
aaed2c33
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
5 deletions
+8
-5
Misc/NEWS.d/next/Core and Builtins/2018-03-07-09-10-42.bpo-33006.Bzx3LA.rst
...ore and Builtins/2018-03-07-09-10-42.bpo-33006.Bzx3LA.rst
+2
-0
Python/bltinmodule.c
Python/bltinmodule.c
+6
-5
No files found.
Misc/NEWS.d/next/Core and Builtins/2018-03-07-09-10-42.bpo-33006.Bzx3LA.rst
0 → 100644
View file @
09ba8333
Clarified Doc string for builtin filter function. 2nd Argument can be any
iterable. Patch by Tony Flury
Python/bltinmodule.c
View file @
09ba8333
...
...
@@ -351,11 +351,12 @@ Fail_arg:
}
PyDoc_STRVAR
(
filter_doc
,
"filter(function or None, sequence) -> list, tuple, or string
\n
"
"
\n
"
"Return those items of sequence for which function(item) is true. If
\n
"
"function is None, return the items that are true. If sequence is a tuple
\n
"
"or string, return the same type, else return a list."
);
"filter(function or None, iterable) -> list, string or tuple
\n
\
\n
\
Return a sequence yielding those items of iterable for which function(item)
\n
\
is true. If function is None, return the items that are true.
\n
\
If iterable is a string or a tuple, the result also has that type; otherwise
\n
\
it is always a list."
);
static
PyObject
*
builtin_format
(
PyObject
*
self
,
PyObject
*
args
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment