]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Patch #1517490: fix glitches in filter() docs.
authorGeorg Brandl <georg@python.org>
Wed, 5 Jul 2006 14:18:49 +0000 (14:18 +0000)
committerGeorg Brandl <georg@python.org>
Wed, 5 Jul 2006 14:18:49 +0000 (14:18 +0000)
 (backport from rev. 47241)

Doc/lib/libfuncs.tex

index b88938a730911cae8643a23eb3b9deebb9adb785..310b4ea626fe4e6d6d729d138b71b4e1e84dacd3 100644 (file)
@@ -432,10 +432,10 @@ class C:
   Construct a list from those elements of \var{list} for which
   \var{function} returns true.  \var{list} may be either a sequence, a
   container which supports iteration, or an iterator,  If \var{list}
-  is a string or a tuple, the result also has that type; otherwise it
-  is always a list.  If \var{function} is \code{None}, the identity
-  function is assumed, that is, all elements of \var{list} that are false
-  (zero or empty) are removed.
+  is a string (either \code{str} or \code{unicode}) or a tuple, the result
+  also has that type; otherwise it is always a list.  If \var{function} is
+  \code{None}, the identity function is assumed, that is, all elements of
+  \var{list} that are false are removed.
 
   Note that \code{filter(function, \var{list})} is equivalent to
   \code{[item for item in \var{list} if function(item)]} if function is