On Sep 11, 2017 2:32 PM, "Neil Schemenauer" <nas-python-id...@arctrix.com>
wrote:

On 2017-09-11, Neil Schemenauer wrote:
> A module can be a singleton instance of a singleton ModuleType
> instance.

Maybe more accurate to say each module would have its own unique
__class__ associated with it.  So, you can add properties to the
class without affecting other modules.  For backwards compatibility,
we can create anonymous modules as needed if people are passing
'dict' objects to the legacy API.


FYI, you should be able to try this out using a custom loader the
implements a create_module() method.  See importlib.abc.Finder.

-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/

Reply via email to