[Python-ideas] lazy import via __future__ or compiler analysis

Neil Schemenauer nas-python-ideas at arctrix.com
Mon Sep 11 16:32:23 EDT 2017


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 APIs.


More information about the Python-ideas mailing list