bpo-45000: Raise SyntaxError when try to delete __debug__ (GH-27947) (GH-27957)

(cherry picked from commit 551da597a0)
This commit is contained in:
Dong-hee Na 2021-08-26 09:52:21 +00:00 committed by GitHub
parent 6ea6cf22e9
commit 32c1caa87f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 0 deletions

View file

@ -59,6 +59,10 @@
Traceback (most recent call last):
SyntaxError: cannot assign to __debug__
>>> del __debug__
Traceback (most recent call last):
SyntaxError: cannot delete __debug__
>>> f() = 1
Traceback (most recent call last):
SyntaxError: cannot assign to function call here. Maybe you meant '==' instead of '='?