It would be resolved at the time the value is accessed in the lazy map. The map then stores the resultant value to avoid attempting to re- import the module on every access.
On Fri, 2021-03-12 at 08:31 +1100, Chris Angelico wrote:
On Fri, Mar 12, 2021 at 8:24 AM Paul Bryan email@example.com wrote:
Probably one of countless examples of performing lazy imports, for precisely the reason of preventing circular imports: https://github.com/fondat/fondat-core/blob/main/fondat/lazy.py
In the case of circular imports, at what point should the lazy import be resolved?
ChrisA _______________________________________________ Python-ideas mailing list -- firstname.lastname@example.org To unsubscribe send an email to email@example.com https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://firstname.lastname@example.org/message/J63KSE... Code of Conduct: http://python.org/psf/codeofconduct/