New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docstring of filter function is incorrect #77187
Comments
Help on built-in function filter in module __builtin__: filter(...)
filter(function or None, sequence) -> list, tuple, or string
(END) The second argument can be an iterable. Suggestion: Replace the docstring with the definition found at https://docs.python.org/2/library/functions.html#filter. |
Strictly speaking the official Python2 reference document isn't a great example - for instance: ' If function is None, the identity function is assumed, that is, all elements of iterable that are false are removed.' Implies that items are removed from the iterable are removed, but they aren't; they are simply not included in the sequence that is returned. Does the documentation need to be fixed too ? |
I guess it does since it gives false information. 2018-04-30 18:05 GMT-04:00 Anthony Flury <report@bugs.python.org>:
|
Thanks for the docstring improvement! It looks like the Library Reference entry for filter has similar wording in 3.x and 2.7 with regard to "items are removed". If soneone feels strongly that that is not precise enough, suggest supplying a separate doc PR. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: