]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
backport tim_one's checkin of
authorMichael W. Hudson <mwh@python.net>
Mon, 11 Mar 2002 10:15:00 +0000 (10:15 +0000)
committerMichael W. Hudson <mwh@python.net>
Mon, 11 Mar 2002 10:15:00 +0000 (10:15 +0000)
    revision 2.248 of bltinmodule.c

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).

Python/bltinmodule.c

index c997ecf5509217f1983ad7db8095b6455da9cc83..41e906adb3e8dbc43a7acd41272dcd0d0ba4bfbc 100644 (file)
@@ -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)