Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
c4c421d6
Commit
c4c421d6
authored
Jun 06, 2019
by
Pablo Galindo
Committed by
GitHub
Jun 06, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bpo-37134: Use PEP570 syntax for sum() (GH-13851)
parent
e9858042
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
Doc/library/functions.rst
Doc/library/functions.rst
+3
-3
No files found.
Doc/library/functions.rst
View file @
c4c421d6
...
...
@@ -1562,11 +1562,11 @@ are always available. They are listed here in alphabetical order.
about strings, see :ref:`textseq`.
.. function:: sum(iterable
[, start]
)
.. function:: sum(iterable
, /, start=0
)
Sums *start* and the items of an *iterable* from left to right and returns the
total.
*start* defaults to ``0``. The *iterable*'s items are normally numbers,
a
nd the start value is not a
llowed to be a string.
total.
The *iterable*'s items are normally numbers, and the start value is not
allowed to be a string.
For some use cases, there are good alternatives to :func:`sum`.
The preferred, fast way to concatenate a sequence of strings is by calling
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment