mirror of
https://github.com/python/cpython.git
synced 2025-08-03 00:23:06 +00:00
Adding new built-in function sum, with docs and tests.
This commit is contained in:
parent
060641d511
commit
a70b19147f
5 changed files with 98 additions and 1 deletions
|
@ -897,6 +897,14 @@ class C:
|
|||
\versionadded{2.2}
|
||||
\end{funcdesc}
|
||||
|
||||
\begin{funcdesc}{sum}{sequence\optional{start=0}}
|
||||
Sums up the items of a \var{sequence}, from left to right, and returns
|
||||
the total. The \var{sequence}'s items are normally numbers, and are
|
||||
not allowed to be strings. The fast, correct way to join up a
|
||||
sequence of strings is by calling \code{''.join(\var{sequence})}.
|
||||
\versionadded{2.3}
|
||||
\end{funcdesc}
|
||||
|
||||
\begin{funcdesc}{super}{type\optional{object-or-type}}
|
||||
Return the superclass of \var{type}. If the second argument is omitted
|
||||
the super object returned is unbound. If the second argument is an
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue