Adding an extra line changes the lazy import object entirely
I ran this on Python 3.15: >>> lazy import json >>> type(globals()['json']) <class 'lazy_import'> I also ran this: >>> lazy import json >>> _ = globals()['json'] >>> type(_) <class 'module'> Why did the output mysteriously change? What caused the lazy import to reify? How can I properly store a reference to the lazy_import object without it reifying?
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.