Python Circular Imports - Stack Abuse
stackabuse.com › python-circular-importsOct 17, 2017 · The module registry is a table of modules that have been initialized and indexed by module name. This table can be accessed through sys.modules. If it was not registered, Python finds the module, initializes it if necessary, and executes it in the new module's namespace. In our example, when Python reaches import module2, it loads and executes it.