Skip to content

Commit d7c7add

Browse files
Zac-HDvstinner
authored andcommitted
bpo-12159: Document sys.maxsize limit in len() function reference (GH-17934)
1 parent c12440c commit d7c7add

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Doc/library/functions.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -892,6 +892,11 @@ are always available. They are listed here in alphabetical order.
892892
sequence (such as a string, bytes, tuple, list, or range) or a collection
893893
(such as a dictionary, set, or frozen set).
894894

895+
.. impl-detail::
896+
897+
``len`` raises :exc:`OverflowError` on lengths larger than
898+
:data:`sys.maxsize`, such as :class:`range(2 ** 100) <range>`.
899+
895900

896901
.. _func-list:
897902
.. class:: list([iterable])

0 commit comments

Comments
 (0)