summaryrefslogtreecommitdiffstats
path: root/Doc/lib/libfuncs.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/lib/libfuncs.tex')
-rw-r--r--Doc/lib/libfuncs.tex15
1 files changed, 8 insertions, 7 deletions
diff --git a/Doc/lib/libfuncs.tex b/Doc/lib/libfuncs.tex
index 5027a04..9d181b1 100644
--- a/Doc/lib/libfuncs.tex
+++ b/Doc/lib/libfuncs.tex
@@ -141,7 +141,7 @@ class C:
If a class method is called for a derived class, the derived class
object is passed as the implied first argument.
- Class methods are different than C++ or Java static methods.
+ Class methods are different than \Cpp{} or Java static methods.
If you want those, see \function{staticmethod()} in this section.
\versionadded{2.2}
\end{funcdesc}
@@ -446,10 +446,10 @@ class C:
function is assumed, that is, all elements of \var{list} that are false
(zero or empty) are removed.
- Note that \code{filter(function, list)} equals
- \code{[item for item in list if function(item)]} if function is not
- \code{None} and \code{[item for item in list if item]} if function is
- None.
+ Note that \code{filter(function, \var{list})} is equivalent to
+ \code{[item for item in \var{list} if function(item)]} if function is
+ not \code{None} and \code{[item for item in \var{list} if item]} if
+ function is \code{None}.
\end{funcdesc}
\begin{funcdesc}{float}{\optional{x}}
@@ -890,7 +890,7 @@ class C(object):
\begin{funcdesc}{slice}{\optional{start,} stop\optional{, step}}
Return a slice object representing the set of indices specified by
\code{range(\var{start}, \var{stop}, \var{step})}. The \var{start}
- and \var{step} arguments default to None. Slice objects have
+ and \var{step} arguments default to \code{None}. Slice objects have
read-only data attributes \member{start}, \member{stop} and
\member{step} which merely return the argument values (or their
default). They have no other explicit functionality; however they
@@ -928,7 +928,8 @@ class C:
The \var{sequence}'s items are normally numbers, and are not allowed
to be strings. The fast, correct way to concatenate sequence of
strings is by calling \code{''.join(\var{sequence})}.
- Note that \code{sum(range(n), m)} equals \code{reduce(operator.add, range(n), m)}
+ Note that \code{sum(range(\var{n}), \var{m})} is equivalent to
+ \code{reduce(operator.add, range(\var{n}), \var{m})}
\versionadded{2.3}
\end{funcdesc}