[issue45781] Deleting __debug__ should be an SyntaxError
Andre Roberge
report at bugs.python.org
Fri Nov 12 18:00:53 EST 2021
Andre Roberge <andre.roberge at gmail.com> added the comment:
What version are you using? As far as I can test, it has become a syntax error since 3.10. Here is the result with the latest 3.11 alpha
> python
Python 3.11.0a2 (tags/v3.11.0a2:e2b4e4b, Nov 5 2021, 20:00:05) [MSC v.1929 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> del __debug__
File "<stdin>", line 1
SyntaxError: cannot delete __debug__
>>> exit()
> python
Python 3.11.0a2 (tags/v3.11.0a2:e2b4e4b, Nov 5 2021, 20:00:05) [MSC v.1929 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> def f():
... del __debug__
...
File "<stdin>", line 2
SyntaxError: cannot delete __debug__
----------
nosy: +aroberge
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45781>
_______________________________________
More information about the Python-bugs-list
mailing list