diff options
author | Georg Brandl <georg@python.org> | 2006-07-05 14:18:45 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2006-07-05 14:18:45 (GMT) |
commit | f41beacecb1bb26adccb0712532e116cd5014009 (patch) | |
tree | 6d527fed9ce9148b9dd94d2673d91c41ef6dfdf3 /Doc | |
parent | add191118fd583107e900c264f6e7aa1e786a387 (diff) | |
download | cpython-f41beacecb1bb26adccb0712532e116cd5014009.zip cpython-f41beacecb1bb26adccb0712532e116cd5014009.tar.gz cpython-f41beacecb1bb26adccb0712532e116cd5014009.tar.bz2 |
Patch #1517490: fix glitches in filter() docs.
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/lib/libfuncs.tex | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Doc/lib/libfuncs.tex b/Doc/lib/libfuncs.tex index 6b7a688..38eeaf1 100644 --- a/Doc/lib/libfuncs.tex +++ b/Doc/lib/libfuncs.tex @@ -468,10 +468,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 |