[Python-ideas] Modules as global namespaces rather than dicts

Koos Zevenhoven 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​



-- 
+ Koos Zevenhoven + http://twitter.com/k7hoven +
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20171115/4f13e942/attachment.html>


More information about the Python-ideas mailing list