]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-12159: Document sys.maxsize limit in len() function reference (GH-17934)
authorZac Hatfield-Dodds <Zac-HD@users.noreply.github.com>
Sun, 12 Jan 2020 09:04:14 +0000 (19:04 +1000)
committerVictor Stinner <vstinner@python.org>
Sun, 12 Jan 2020 09:04:14 +0000 (10:04 +0100)
Doc/library/functions.rst

index dc3391ffe882deca47638ba77107a915636e8d5c..cc48597ef91d502721b7b9c439a4f964dd2b137d 100644 (file)
@@ -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])