Hi Wim!<br><div class="gmail_quote"><div dir="ltr"><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">So now I have a (C++) namespace 'A' that bears no relationship to anything to do with the file system or any type of Python packaging: it exists only in memory for the duration of the python session.<br></blockquote></div><div><br></div><div>Yeah, cool, so we just use a path hook and are ready to go right?</div><div><br></div><div><a href="https://www.python.org/dev/peps/pep-0302/#specification-part-2-registering-hooks">https://www.python.org/dev/peps/pep-0302/#specification-part-2-registering-hooks</a><br></div><div><br></div><div>Every framework gets its own path hook that handles imports from that framework.</div><div><br></div><div>Frameworks with shared namespaces will just handle their own specific paths, right?</div><div><br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">The renaming does not actually scare me that much from a performance point of view: already, C++ has typedefs for classes and aliases for namespaces.<br>
There is always the problem of "leakage" as mentioned above, where the end-user sees both at some point, but internally, aliasing will work fine: it's just another reference to the same object.<br></blockquote></div><div><br></div><div>Cool, so this might be possible after all! Certainly not as a top priority before getting things<span style="font-size:13px"> to work, but still!</span></div><div><br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">It is to attach a meta class for a __getattr__, the use of properties, and to allow pickling. The module type does not support meta classes.<br></blockquote></div><div><br></div><div>Can't we replace the framework modules’ type with a subclass of both “module” and “type”?</div><div><br></div><div>Thank you for explaining,</div><div>Best regards, Philipp</div>