diff --git a/Doc/library/exceptions.rst b/Doc/library/exceptions.rst index b5ba86f1b19223..5af7561b2c0b17 100644 --- a/Doc/library/exceptions.rst +++ b/Doc/library/exceptions.rst @@ -866,6 +866,8 @@ The following exceptions are used as warning categories; see the Base class for warnings about dubious syntax. + This warning is emitted when compiling Python source code to bytecode. + .. exception:: RuntimeWarning diff --git a/Doc/library/warnings.rst b/Doc/library/warnings.rst index 68b9ff5ce2f78c..72aa491c2c1b67 100644 --- a/Doc/library/warnings.rst +++ b/Doc/library/warnings.rst @@ -80,7 +80,8 @@ The following warnings category classes are currently defined: | | unless triggered by code in ``__main__``). | +----------------------------------+-----------------------------------------------+ | :exc:`SyntaxWarning` | Base category for warnings about dubious | -| | syntactic features. | +| | syntactic features (emitted when compiling | +| | Python source code to bytecode). | +----------------------------------+-----------------------------------------------+ | :exc:`RuntimeWarning` | Base category for warnings about dubious | | | runtime features. |