[Python-checkins] python/dist/src/Doc/lib libfuncs.tex,1.179,1.180
rhettinger at users.sourceforge.net
rhettinger at users.sourceforge.net
Fri Mar 11 07:50:06 CET 2005
Update of /cvsroot/python/python/dist/src/Doc/lib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16483/Doc/lib
Modified Files:
libfuncs.tex
Log Message:
Add two new functions, any() and all().
Index: libfuncs.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libfuncs.tex,v
retrieving revision 1.179
retrieving revision 1.180
diff -u -d -r1.179 -r1.180
--- libfuncs.tex 7 Jan 2005 04:33:44 -0000 1.179
+++ libfuncs.tex 11 Mar 2005 06:49:32 -0000 1.180
@@ -60,6 +60,32 @@
complex number, its magnitude is returned.
\end{funcdesc}
+\begin{funcdesc}{all}{iterable}
+ Return True if all elements of the \var{iterable} are true.
+ Equivalent to:
+ \begin{verbatim}
+ def all(iterable):
+ for element in iterable:
+ if not element:
+ return False
+ return True
+ \end{verbatim}
+ \versionadded{2.5}
+\end{funcdesc}
+
+\begin{funcdesc}{any}{iterable}
+ Return True if any element of the \var{iterable} is true.
+ Equivalent to:
+ \begin{verbatim}
+ def any(iterable):
+ for element in iterable:
+ if element:
+ return True
+ return False
+ \end{verbatim}
+ \versionadded{2.5}
+\end{funcdesc}
+
\begin{funcdesc}{basestring}{}
This abstract type is the superclass for \class{str} and \class{unicode}.
It cannot be called or instantiated, but it can be used to test whether
More information about the Python-checkins
mailing list