Utilities to be used at import time
Simple circular dependency resolver - creates a stub object for the module to be imported in the future, so that when the module is used inside for the first time inside a function later, the stub is replaced by the actual module in a seamless way.
Usage:
from extraimport import lazyimport
incomplete = lazyimport()
def myfunc():
# actual import takes place only when myfunc() is run
incomplete.member()
-
Evolve lazyimport to work with packages and more specific syntaxes
-
Port over "MapGetter" from the
extradict
package to allow using theimport
statement to retrieve object attributes.