[issue32615] Inconsistent behavior if globals is a dict subclass

Paul Sokolovsky report at bugs.python.org
Fri Jan 17 07:34:56 EST 2020


Paul Sokolovsky <pfalcon at users.sourceforge.net> added the comment:

> We may be possible to replace bytecode from `STORE_GLOBAL _cnt; LOAD_GLOBAL _cnt` into `DUP_TOP; STORE_GLOBAL _cnt`.

Sounds good, and that's why I personally care about the "STORE" case, and the patch I submit touches only it, which would affect only cases when explicit "global var" declarations are used, which aren't frequent. I definitely would be too shy to submit a patch for more LOAD_* cases, though I may image why people may want that still.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32615>
_______________________________________


More information about the Python-bugs-list mailing list