On Nov 29, 2007 11:54 AM, Guido van Rossum <[EMAIL PROTECTED]> wrote: > But then I thought, what if we renamed the __builtin__ module instead > to builtins, and left __builtins__ alone?
Hmm. __builtins__ is a magic hook, but __builtin__-the-module isn't the thing it hooks, exactly, not the way __import__ hooks import or __iter__ hooks iter(). Really the __builtin__ module *implements* the __builtins__ hook protocol. It would be cool to have a name for __builtin__ the module that suggests that. I suggest sys.builtins. The builtins module feels both central enough and magical enough to belong in sys. And a lot of other stuff in sys has the same "it's fun but slightly crazy to tweak this knob" vibe. And, for sandboxers, mysandbox.builtins seems like a nice parallel to sys.builtins, with "sys" serving the bonus role of suggesting "unrestricted access". -j _______________________________________________ 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