summaryrefslogtreecommitdiffstats
path: root/Doc/library/functions.rst
diff options
context:
space:
mode:
authorZac Hatfield-Dodds <Zac-HD@users.noreply.github.com>2020-01-12 09:04:14 (GMT)
committerVictor Stinner <vstinner@python.org>2020-01-12 09:04:14 (GMT)
commitd7c7adde003ddca5cbe4fc47cf09464ab95a066e (patch)
tree139bfc9f392a7602ae3451a2544db49888e02ae8 /Doc/library/functions.rst
parentc12440c371025bea9c3bfb94945f006c486c2c01 (diff)
downloadcpython-d7c7adde003ddca5cbe4fc47cf09464ab95a066e.zip
cpython-d7c7adde003ddca5cbe4fc47cf09464ab95a066e.tar.gz
cpython-d7c7adde003ddca5cbe4fc47cf09464ab95a066e.tar.bz2
bpo-12159: Document sys.maxsize limit in len() function reference (GH-17934)
Diffstat (limited to 'Doc/library/functions.rst')
-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 dc3391f..cc48597 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])