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 BTaskaya
Recipients BTaskaya, bup, matrixise, serhiy.storchaka, steven.daprano, xtreak
Date 2019-12-21.08:34:17
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1576917257.87.0.271796536748.issue36000@roundup.psfhosted.org>
In-reply-to
Content
import builtins
builtins.__dict__['__debug__'] = 'Surprise!'
builtins.__dict__['None'] = 'Surprise!'

print(__debug__)
print(None)

 $ ./python ../t.py
True
None

I guess this is related to Python/ast_opt.c transformation

    case Name_kind:
        if (_PyUnicode_EqualToASCIIString(node_->v.Name.id, "__debug__")) {
            return make_const(node_, PyBool_FromLong(!optimize_), ctx_);
        }
        break;
History
Date User Action Args
2019-12-21 08:34:18BTaskayasetrecipients: + BTaskaya, steven.daprano, serhiy.storchaka, matrixise, bup, xtreak
2019-12-21 08:34:17BTaskayasetmessageid: <1576917257.87.0.271796536748.issue36000@roundup.psfhosted.org>
2019-12-21 08:34:17BTaskayalinkissue36000 messages
2019-12-21 08:34:17BTaskayacreate