This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Carl.Friedrich.Bolz
Recipients Carl.Friedrich.Bolz
Date 2021-11-11.09:45:11
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1636623911.67.0.569601489226.issue45781@roundup.psfhosted.org>
In-reply-to
Content
Right now, deleting __debug__ is not prevented:

>>> def f():
...     del __debug__
... 

Of course actually executing it doesn't work:

>>> del __debug__
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name '__debug__' is not defined


Compare with assigning to __debug__:

>>> def f():
...     __debug__ = 1
... 
  File "<stdin>", line 2
SyntaxError: cannot assign to __debug__
History
Date User Action Args
2021-11-11 09:45:11Carl.Friedrich.Bolzsetrecipients: + Carl.Friedrich.Bolz
2021-11-11 09:45:11Carl.Friedrich.Bolzsetmessageid: <1636623911.67.0.569601489226.issue45781@roundup.psfhosted.org>
2021-11-11 09:45:11Carl.Friedrich.Bolzlinkissue45781 messages
2021-11-11 09:45:11Carl.Friedrich.Bolzcreate