Path: csiph.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail From: Piergiorgio Sartor Newsgroups: comp.lang.python Subject: Re: Lazy Imports -- I Like This Idea Date: Sat, 28 Mar 2026 11:40:47 +0100 Organization: A noiseless patient Spider Lines: 21 Message-ID: References: <10q22pv$2f060$2@dont-email.me> <10q7n78$atfj$2@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Sat, 28 Mar 2026 10:45:46 +0000 (UTC) Injection-Info: dont-email.me; posting-host="3770d29748759a93f1c99ebd2d31dde5"; logging-data="573241"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19djXACJAJXHbJtVdc4F0he" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:a5z+xyjd1o/s/vlFCU+2/jnJgr0= Content-Language: it, en-GB In-Reply-To: <10q7n78$atfj$2@dont-email.me> Xref: csiph.com comp.lang.python:197749 On 28/03/2026 05.59, DFS wrote: [...] > Faster startup is nice, but lazy importing doesn't reduce total runtime > of the program, right? Different objective, anyway. It *might* reduce total runtime, it depends on the code structure. If the code is multi-threaded, likely having the imports *per thread* is better than having them globally. YMMV bye, -- piergiorgio