Documentation
The only place there's a mention a possible exception is at
|
.. versionchanged:: 3.11 |
|
:class:`int` string inputs and string representations can be limited to |
|
help avoid denial of service attacks. A :exc:`ValueError` is raised when |
|
the limit is exceeded while converting a string to an :class:`int` or |
|
when converting an :class:`int` into a string would exceed the limit. |
|
See the :ref:`integer string conversion length limitation |
|
<int_max_str_digits>` documentation. |
Other classes/functions document their behavior. for example:
|
This function raises :exc:`SyntaxError` or :exc:`ValueError` if the compiled |
|
source is invalid. |
|
For example, ``complex('1+2j')`` is fine, but ``complex('1 + 2j')`` raises |
|
:exc:`ValueError`. |
Documentation
The only place there's a mention a possible exception is at
cpython/Doc/library/functions.rst
Lines 1099 to 1105 in 5049eb1
Other classes/functions document their behavior. for example:
cpython/Doc/library/functions.rst
Lines 347 to 348 in 5049eb1
cpython/Doc/library/functions.rst
Lines 424 to 425 in 5049eb1