From: Tim Peters Date: Sat, 9 Mar 2002 00:06:26 +0000 (+0000) Subject: Docstring for filter(): Someone on the Tutor list reasonably complained X-Git-Tag: v2.3c1~6542 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d50e544b9f67738f122d9931eab8b8d71633527a;p=python 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). --- diff --git a/Python/bltinmodule.c b/Python/bltinmodule.c index c997ecf550..41e906adb3 100644 --- a/Python/bltinmodule.c +++ b/Python/bltinmodule.c @@ -247,11 +247,11 @@ Fail_it: } static char filter_doc[] = -"filter(function, sequence) -> list\n\ -\n\ -Return a list containing those items of sequence for which function(item)\n\ -is true. If function is None, return a list of items that are true."; - +"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."; static PyObject * builtin_chr(PyObject *self, PyObject *args)