Author bruno.dupuis
Recipients DragonFireCK, Horpner, alex, benjamin.peterson, brett.cannon, bruno.dupuis, cvrebert, georg.brandl, ikelly, meador.inge, mrabarnett, ncoghlan, python-dev, steven.daprano, terry.reedy
Date 2012-12-06.00:37:02
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
We definitely need to put the code that loads constants with LOAD_CONST out of the optimization code. It's not optim, it's a language feature: None *is* a 'singleton' constant.

I'm trying to figure out how to change compile.c to achieve this, as it's my first dive into the compiler code, it's not that easy.

Another approch is to strip unreachable nodes in AST, but

a) it's quite complex, as Terry said

b) it solves only this particular bug, not the general assertion "None, True and False are reserved words bound to constants. It can not ever be loaded with LOAD_NAME or LOAD_GLOBAL"
Date User Action Args
2012-12-06 00:37:02bruno.dupuissetrecipients: + bruno.dupuis, brett.cannon, georg.brandl, terry.reedy, ncoghlan, ikelly, Horpner, benjamin.peterson, mrabarnett, steven.daprano, alex, cvrebert, meador.inge, python-dev, DragonFireCK
2012-12-06 00:37:02bruno.dupuissetmessageid: <>
2012-12-06 00:37:02bruno.dupuislinkissue16619 messages
2012-12-06 00:37:02bruno.dupuiscreate