[issue32615] Inconsistent behavior if globals is a dict subclass

Paul Sokolovsky report at bugs.python.org
Mon Dec 30 18:00:11 EST 2019


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

> The doc for exec says globals "must be a dictionary (and not a subclass of dictionary)"

Docs are full of mistakes and outdated information.

Fixing STORE_GLOBAL case from https://bugs.python.org/issue36220#msg359046 would be trivial and cheap re: overheads. And useful, yeah.

And the gentleman who submitted the other ticket argues that:

> but the inconsistency between LOAD_NAME and LOAD_GLOBAL definitely seems wrong.

Which is easy to agree with, though there're more concerns re: runtime overhead.

----------

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


More information about the Python-bugs-list mailing list