We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 91e5ee5 commit bfc7dffCopy full SHA for bfc7dff
Doc/reference/datamodel.rst
@@ -1891,6 +1891,14 @@ sequences, it should iterate through the values.
1891
:meth:`__nonzero__` method and whose :meth:`__len__` method returns zero is
1892
considered to be false in a Boolean context.
1893
1894
+ .. impl-detail::
1895
+
1896
+ In CPython, the length is required to be at most :attr:`sys.maxsize`.
1897
+ If the length is larger than :attr:`!sys.maxsize` some features (such as
1898
+ :func:`len`) may raise :exc:`OverflowError`. To prevent raising
1899
+ :exc:`!OverflowError` by truth value testing, an object must define a
1900
+ :meth:`__nonzero__` method.
1901
1902
1903
.. method:: object.__getitem__(self, key)
1904
0 commit comments