<br><br><div class="gmail_quote">On Tue, Apr 17, 2012 at 13:45, Philip Jenvey <span dir="ltr">&lt;<a href="mailto:pjenvey@underboss.org">pjenvey@underboss.org</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"><br>
On Apr 14, 2012, at 1:03 PM, Brett Cannon wrote:<br>
<br>
&gt; And lastly, sticking None in sys.path_importer_cache would no longer mean &quot;do the implicit thing&quot; and instead would mean the same as NullImporter does now (which also means import can put None into sys.path_importer_cache instead of NullImporter): no finder is available for an entry on sys.path when None is found.<br>


<br>
</div>Isn&#39;t it more explicit to cache the NullImporter instead of None?<br></blockquote><div><br></div><div>I disagree. NullImporter is just another finder that just so happens to always fail. None is explicitly not a finder and thus obviously not going to do anything. Isn&#39;t it clearer to say ``sys.path_importer_cache[path] is None`` than ``isinstance(sys.path_importer_cache[path], imp.NullImporter)``? I mean we have None to represent something is nothing which is exactly what I want to convey; None in sys.path_importer_cache means there is no finder for that path.</div>

</div>