Re:LLMs are mortally terrified of exceptions
by kccqzy on Thursday October 09, 2025 @04:57PM
(#45533006)
It's to make imports lazy, to solve the issue of slow import at startup.
[ Parent
| on HN ]
Re:LLMs are mortally terrified of exceptions
by falcor84 on Thursday October 09, 2025 @05:26PM
(#45533273)
While there are some cases where lazy imports are appropriate, this function, and the vast majority of such lazy imports that I get from Claude are not.
In particular, I can't think of any non-pathological situation where a python developer should import logging and update logging.basicConfig within an inner function.