diff Python/bltinmodule.c @ 22200:dab05ab0347b legacy-trunk

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).
author Tim Peters <tim.peters@gmail.com>
date Sat, 09 Mar 2002 00:06:26 +0000
parents 67a5e25dc88b
children 5d383006d36b f4487350c537
line wrap: on
line diff
--- a/Python/bltinmodule.c	Fri Mar 08 22:02:06 2002 +0000
+++ b/Python/bltinmodule.c	Sat Mar 09 00:06:26 2002 +0000
@@ -247,11 +247,11 @@
 }
 
 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)