Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d50e544

Browse files
committed
Docstring for filter(): Someone on the Tutor list reasonably complained
that it didn't tell enough of the truth. Bugfix candidate (I guess -- it helps and it's harmless).
1 parent 632bda3 commit d50e544

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

Python/bltinmodule.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -247,11 +247,11 @@ builtin_filter(PyObject *self, PyObject *args)
247247
}
248248

249249
static char filter_doc[] =
250-
"filter(function, sequence) -> list\n\
251-
\n\
252-
Return a list containing those items of sequence for which function(item)\n\
253-
is true. If function is None, return a list of items that are true.";
254-
250+
"filter(function or None, sequence) -> list, tuple, or string\n"
251+
"\n"
252+
"Return those items of sequence for which function(item) is true. If\n"
253+
"function is None, return the items that are true. If sequence is a tuple\n"
254+
"or string, return the same type, else return a list.";
255255

256256
static PyObject *
257257
builtin_chr(PyObject *self, PyObject *args)

0 commit comments

Comments
 (0)