From: Zac Hatfield-Dodds Date: Sun, 12 Jan 2020 09:04:14 +0000 (+1000) Subject: bpo-12159: Document sys.maxsize limit in len() function reference (GH-17934) X-Git-Tag: v3.9.0a3~96 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d7c7adde003ddca5cbe4fc47cf09464ab95a066e;p=thirdparty%2FPython%2Fcpython.git bpo-12159: Document sys.maxsize limit in len() function reference (GH-17934) --- diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst index dc3391ffe882..cc48597ef91d 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) `. + .. _func-list: .. class:: list([iterable])