<br><br><div class="gmail_quote">On Fri, Oct 9, 2009 at 18:14, Benjamin Peterson <span dir="ltr"><<a href="mailto:benjamin@python.org">benjamin@python.org</a>></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 <<a href="mailto:lists@cheimes.de">lists@cheimes.de</a>>:<br>
</div><div class="im">> Benjamin Peterson wrote:<br>
>> I think we should make a semi-private (public to the stdlib) module<br>
>> like _sys or _implementation part of the Python VM API. Then, instead<br>
>> of stuffing everything into sys, we can provide this information in<br>
>> modules where it belongs.<br>
><br>
><br>
> That's an interesting counter proposal. Your idea requires an additional<br>
> import that I try to avoid. Looking at memory and performance, an<br>
> additional module that is imported anyway isn't better. In my humble<br>
> opinion the implementation information belongs into the sys module<br>
> 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'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't see why this doesn'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 'exceptions'), but I don'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'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's assuming the other interpreters makes it built-in. Otherwise it'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>