Closed KOLANICH closed 5 years ago
But it is possible to have a pure python implementation - as a matter of fact there are two provided: lazy_object_proxy.simple.Proxy
and lazy_object_proxy.slots.Proxy
. The C extension is mainly there for speed.
About the import system - it's not clear what you're asking.
Thank you for the clarification.
Long ago I have tried to write a similar module but in pure python without any native exts, and have failed. It worked somehow, but not always (and now I don't remember where had it been failing) and googling revealed that it is impossible to hook the needed operations in pure python. So I have started using this module and have written a lib for lazy importing of modules.
Now I have heard about builtin module loading machinery of python and wanna know if it is suspectable to the same limitations of pure-python approach. But to know it one has to remember the limitations first.