Document the current practice for SystemError #95799
Labels
3.10
only security fixes
3.11
only security fixes
3.12
bugs and security fixes
docs
Documentation in the Doc dir
topic-C-API
@malemburg pointed that the documentation of
SystemError
only refers to CPython internal errors as the source.https://docs.python.org/3/library/exceptions.html#SystemError
On practice, SystemError is also raised on improper use of the C API (like NULL pointer, or negative size, or wrong type in the concrete API) if it is possible to detect such error and it is not too costly (macros usually lack any argument checks). An alternative to SystemError is a crash or memory corruption. Currently the main source of SystemError is errors in third-party extensions, not in the Python core or standard extensions.
The documentation looks outdated, perhaps it predates the public C API.
The text was updated successfully, but these errors were encountered: