Open
Description
Is there a mechanism to check which objects have been loaded and which ones are still in the "lazy" state? Looking through the code and inspecting the objects returned by lazy.attach_stub
it didn't see an obvious way to do so.
Maybe this could be addressed by making attach
not return simple functions but objects. E.g.
__getattr__, __dir__, _ = lazy.attach_stub(__name__, __file__)
__getattr__.loaded_names # return names which were already loaded
I think this would be very helpful in debugging and testing that lazy loading actually works as intended.
I'd be happy to work on this if there is interest!
Metadata
Metadata
Assignees
Labels
New feature or requestNew feature or request