summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Hatfield-Dodds <Zac-HD@users.noreply.github.com>2020-01-12 19:04:14 +1000
committerVictor Stinner <vstinner@python.org>2020-01-12 10:04:14 +0100
commitd7c7adde003ddca5cbe4fc47cf09464ab95a066e (patch)
tree139bfc9f392a7602ae3451a2544db49888e02ae8
parentc12440c371025bea9c3bfb94945f006c486c2c01 (diff)
downloadcpython-git-d7c7adde003ddca5cbe4fc47cf09464ab95a066e.tar.gz
bpo-12159: Document sys.maxsize limit in len() function reference (GH-17934)
-rw-r--r--Doc/library/functions.rst5
1 files changed, 5 insertions, 0 deletions
diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst
index dc3391ffe8..cc48597ef9 100644
--- a/Doc/library/functions.rst
+++ b/Doc/library/functions.rst
@@ -892,6 +892,11 @@ are always available. They are listed here in alphabetical order.
sequence (such as a string, bytes, tuple, list, or range) or a collection
(such as a dictionary, set, or frozen set).
+ .. impl-detail::
+
+ ``len`` raises :exc:`OverflowError` on lengths larger than
+ :data:`sys.maxsize`, such as :class:`range(2 ** 100) <range>`.
+
.. _func-list:
.. class:: list([iterable])