Skip to content

Commit 5f79067

Browse files
beboundncoghlan
andauthored
gh-123858: Improve Doc: SyntaxWarning is emitted during bytecode generation (gh-122844)
--------- Co-authored-by: Alyssa Coghlan <[email protected]>
1 parent 88bfe4c commit 5f79067

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

Doc/library/exceptions.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -897,6 +897,9 @@ The following exceptions are used as warning categories; see the
897897

898898
Base class for warnings about dubious syntax.
899899

900+
This warning is typically emitted when compiling Python source code, and usually won't be reported
901+
when running already compiled code.
902+
900903

901904
.. exception:: RuntimeWarning
902905

Doc/library/warnings.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,9 @@ The following warnings category classes are currently defined:
8080
| | unless triggered by code in ``__main__``). |
8181
+----------------------------------+-----------------------------------------------+
8282
| :exc:`SyntaxWarning` | Base category for warnings about dubious |
83-
| | syntactic features. |
83+
| | syntactic features (typically emitted when |
84+
| | compiling Python source code, and hence |
85+
| | may not be suppressed by runtime filters) |
8486
+----------------------------------+-----------------------------------------------+
8587
| :exc:`RuntimeWarning` | Base category for warnings about dubious |
8688
| | runtime features. |

0 commit comments

Comments
 (0)