Andre Roberge <andre.robe...@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 <rep...@bugs.python.org> <https://bugs.python.org/issue45781> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com