<div dir="auto"><div><div class="gmail_extra"><div class="gmail_quote">On Sep 12, 2017 10:17 AM, "Neil Schemenauer" <<a href="mailto:nas-python-ideas@arctrix.com">nas-python-ideas@arctrix.com</a>> wrote:<blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Introducing another special feature of modules to make this work is<br>
not the solution, IMHO.  We should make module namespaces be more<br>
like instance namespaces.  We already have a mechanism and it is<br>
getattr on objects.<br></blockquote></div></div></div><div dir="auto"><br></div><div dir="auto">+1</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
- importlib needs to be fixed to pass modules to exec() and not<br>
  dicts.  From my initial experiments, it looks like importlib gets<br>
  a lot simpler.  Right now we pass around dicts in a lot of places<br>
  and then have to grub around in sys.modules to get the module<br>
  object, which is what importlib usually wants.<br></blockquote></div></div></div><div dir="auto"><br></div><div dir="auto">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.</div><div dir="auto"><br></div><div dir="auto"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I have requested help in writing a PEP for this idea but so far no<br>
one is foolish enough to join my crazy endeavor. ;-)</blockquote></div></div></div><div dir="auto"><br></div><div dir="auto">Yeah, good luck! :). If I weren't otherwise occupied with my own crazy endeavor I'd lend a hand.</div><div dir="auto"><br></div><div dir="auto">-eric</div></div>