Steven D'Aprano <steve+pyt...@pearwood.info> added the comment:
I'm not sure that __debug__ is a proper keyword. Unlike None, if you monkey-patch builtins, you can modify it: py> builtins.__dict__['__debug__'] = 'Surprise!' py> __debug__ 'Surprise!' py> builtins.__dict__['None'] = 'Surprise!' py> None py> And it is not listed here: https://docs.python.org/3.7/reference/lexical_analysis.html#keywords So __debug__ appears to me to be in a strange grey area, part regular name and part keyword, but not quite either. ---------- nosy: +steven.daprano _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue36000> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com