On Sep 12, 2017 10:17 AM, "Neil Schemenauer" <nas-python-id...@arctrix.com> wrote:
Introducing another special feature of modules to make this work is not the solution, IMHO. We should make module namespaces be more like instance namespaces. We already have a mechanism and it is getattr on objects. +1 - importlib needs to be fixed to pass modules to exec() and not dicts. From my initial experiments, it looks like importlib gets a lot simpler. Right now we pass around dicts in a lot of places and then have to grub around in sys.modules to get the module object, which is what importlib usually wants. Without looking at the importlib code, passing around modules should mostly be fine. There is some semantic trickiness involving sys.modules, but it shouldn't be too bad to work around. I have requested help in writing a PEP for this idea but so far no one is foolish enough to join my crazy endeavor. ;-) Yeah, good luck! :). If I weren't otherwise occupied with my own crazy endeavor I'd lend a hand. -eric
_______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/