File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
Misc/NEWS.d/next/Core and Builtins Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -2265,6 +2265,10 @@ def f(x: *b)
22652265 Traceback (most recent call last):
22662266 SyntaxError: cannot assign to __debug__
22672267
2268+ >>> class A[__debug__]: pass
2269+ Traceback (most recent call last):
2270+ SyntaxError: cannot assign to __debug__
2271+
22682272 >>> class A[T]((x := 3)): ...
22692273 Traceback (most recent call last):
22702274 ...
Original file line number Diff line number Diff line change 11Detection of writes to ``__debug__ `` is moved from the compiler's codegen
2- stage to the symtable. This means that these errors now detected even in
2+ stage to the symtable. This means that these errors are now detected even in
33code that is optimized away before codegen (such as assertions with the
4- :option: `-O ` command line option.)
4+ :option: `-O ` command line option).
You can’t perform that action at this time.
0 commit comments