<br><br><div class="gmail_quote">On Thu, Feb 9, 2012 at 13:43, PJ Eby <span dir="ltr">&lt;<a href="mailto:pje@telecommunity.com">pje@telecommunity.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div class="im"><p><br>
On Feb 9, 2012 9:58 AM, &quot;Brett Cannon&quot; &lt;<a href="mailto:brett@python.org" target="_blank">brett@python.org</a>&gt; wrote:<br>
&gt; This actually depends on the type of ImportError. My current solution actually would trigger an ImportError at the import statement if no finder could locate the module. But if some ImportError was raised because of some other issue during load then that would come up at first use.</p>



</div><p>That&#39;s not really a lazy import then, or at least not as lazy as what Mercurial or PEAK use for general lazy importing.  If you have a lot of them, that module-finding time really adds up.</p>
<p>Again, the goal is fast startup of command-line tools that only use a small subset of the overall framework; doing disk access for lazy imports goes against that goal.<br>
</p>
</blockquote></div>Depends if you consider stat calls the overhead vs. the actual disk read/write to load the data. Anyway, this is going to lead down to a discussion/argument over design parameters which I&#39;m not up to having since I&#39;m not actively working on a lazy loader for the stdlib right now.