CPython's LazyImport Implementation in C
Lazy imports work by parking a proxy object in the namespace and atomically replacing it with the real module the first time the name is touched.
Lazy imports work by parking a proxy object in the namespace and atomically replacing it with the real module the first time the name is touched.