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 <>
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__
Date User Action Args
2021-11-11 09:45:11Carl.Friedrich.Bolzsetrecipients: + Carl.Friedrich.Bolz
2021-11-11 09:45:11Carl.Friedrich.Bolzsetmessageid: <>
2021-11-11 09:45:11Carl.Friedrich.Bolzlinkissue45781 messages
2021-11-11 09:45:11Carl.Friedrich.Bolzcreate