[Python-ideas] Modules as global namespaces rather than dicts
k7hoven at gmail.com
Wed Nov 15 04:43:19 EST 2017
On Wed, Nov 15, 2017 at 8:44 AM, Nick Coghlan <ncoghlan at gmail.com> wrote:
> I like the idea in principle, but highlighting a particular backwards
> compatibility pain point: one of the complications in importlib is that we
> promise to keep the "sys.modules[__name__] = some_other_object" idiom
> working. That means the need to do that check exists regardless of whether
> importlib is passing the module itself around, or the module's dict.
Another point, perhaps more difficult to address: Would for instance
globals() then return a module instead of a dict/mapping?
+ Koos Zevenhoven + http://twitter.com/k7hoven +
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-ideas