<br><br><div class="gmail_quote">On Fri, Oct 9, 2009 at 18:14, Benjamin Peterson <span dir="ltr">&lt;<a href="mailto:benjamin@python.org">benjamin@python.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">2009/10/9 Christian Heimes &lt;<a href="mailto:lists@cheimes.de">lists@cheimes.de</a>&gt;:<br>
</div><div class="im">&gt; Benjamin Peterson wrote:<br>
&gt;&gt; I think we should make a semi-private (public to the stdlib) module<br>
&gt;&gt; like _sys or _implementation part of the Python VM API. Then, instead<br>
&gt;&gt; of stuffing everything into sys, we can provide this information in<br>
&gt;&gt; modules where it belongs.<br>
&gt;<br>
&gt;<br>
&gt; That&#39;s an interesting counter proposal. Your idea requires an additional<br>
&gt; import that I try to avoid. Looking at memory and performance, an<br>
&gt; additional module that is imported anyway isn&#39;t better. In my humble<br>
&gt; opinion the implementation information belongs into the sys module<br>
&gt; anyway. A new module just for the user site suffix seems unnecessary.<br>
<br>
</div>But we want to hide that this is an implementation detail from the<br>
user. Having a new module just for this attribute might seem like<br>
overkill, but I hope that we could use it for more things in the<br>
future.</blockquote><div><br></div><div>To also address Christian&#39;s import worry, this new module could contain everything needed to start the interpreter, much like _warnings does compared to warnings.</div><div><br>

</div><div>But I honestly don&#39;t see why this doesn&#39;t belong in sys; it has to do with the system environment which is the interpreter. Yes, some things currently in sys could possibly be put elsewhere (e.g. the exception stuff could be in &#39;exceptions&#39;), but I don&#39;t think sys is that much of an odd collection of code. Without having a desire to eventually clean up the sys module (which I am not proposing as I know that will never fly) I don&#39;t see this as being worth it.</div>

<div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"> Besides, if _sys is a builtin module, importing it will not<br>
add much overhead.<br></blockquote><div><br></div><div>Well, that&#39;s assuming the other interpreters makes it built-in. Otherwise it&#39;s only a CPython/<a href="http://python.org">python.org</a> perk.</div><div> </div>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
I forgot to ask before: Does this deprecate platform.python_implementation()?</blockquote><div><br></div><div> Probably should.</div><div><br></div><div>-Brett</div></div>