On 2017-11-15, Koos Zevenhoven wrote:
> Another point, perhaps more difficult to address: Would for instance
> globals() then return a module instead of a dict/mapping?​

For compatibility, it would definitely have to return a dict.  As a
result, calling globals() would cause the "fast globals" flag to be
cleared.  My hope is that getting a reference to the module dict
from user code is the exception rather than the norm.  I.e. most
modules would never have globals() called within their code.  If it
is too common, the flag will be cleared on most modules and we won't
gain much speed.
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to