Skip to content

Commit a8074ea

Browse files
Zac-HDshihai1991
authored andcommitted
bpo-12159: Document sys.maxsize limit in len() function reference (pythonGH-17934)
1 parent 3792b4b commit a8074ea

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎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)