Title: "pydoc filter" documentation restrictive
Type: enhancement Stage: resolved
Components: Documentation Versions: Python 2.7
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: docs@python Nosy List: docs@python, lebigot, serhiy.storchaka
Priority: normal Keywords:

Created on 2015-01-04 13:19 by lebigot, last changed 2020-02-26 19:16 by serhiy.storchaka. This issue is now closed.

Messages (2)
msg233416 - (view) Author: Eric O. LEBIGOT (lebigot) Date: 2015-01-04 13:19
The pydoc documentation for filter reads:

    filter(function or None, sequence) -> list, tuple, or string
    Return those items of sequence for which function(item) is true.  If
    function is None, return the items that are true.  If sequence is a tuple
    or string, return the same type, else return a list.

It would be nicer to know (e.g. when offline and with no local access to the HTML documentation) that filter() can actually be used more generally with an iterable:

    filter(function or None, **iterable**) -> list, tuple, or string
    Return those items of **iterable** for which…
msg362716 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2020-02-26 19:16
It was fixed in Python 3, and it is too late for 2.7.
Date User Action Args
2020-02-26 19:16:09serhiy.storchakasetstatus: open -> closed

nosy: + serhiy.storchaka
messages: + msg362716

resolution: out of date
stage: resolved
2015-01-04 13:19:32lebigotcreate