mirror of
https://github.com/python/cpython.git
synced 2025-08-03 08:34:29 +00:00
Fix a variety of small markup nits.
This commit is contained in:
parent
e2ff8be761
commit
2884d6de15
6 changed files with 21 additions and 20 deletions
|
@ -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}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue