On Fri, Oct 9, 2009 at 18:14, Benjamin Peterson <benja...@python.org> wrote:
> 2009/10/9 Christian Heimes <li...@cheimes.de>: > > Benjamin Peterson wrote: > >> I think we should make a semi-private (public to the stdlib) module > >> like _sys or _implementation part of the Python VM API. Then, instead > >> of stuffing everything into sys, we can provide this information in > >> modules where it belongs. > > > > > > That's an interesting counter proposal. Your idea requires an additional > > import that I try to avoid. Looking at memory and performance, an > > additional module that is imported anyway isn't better. In my humble > > opinion the implementation information belongs into the sys module > > anyway. A new module just for the user site suffix seems unnecessary. > > But we want to hide that this is an implementation detail from the > user. Having a new module just for this attribute might seem like > overkill, but I hope that we could use it for more things in the > future. 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. 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. > Besides, if _sys is a builtin module, importing it will not > add much overhead. > Well, that's assuming the other interpreters makes it built-in. Otherwise it's only a CPython/python.org perk. > > I forgot to ask before: Does this deprecate > platform.python_implementation()? Probably should. -Brett
_______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com