A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2007-November/075465.html below:

[Python-Dev] [poll] New name for __builtins__

[Python-Dev] [poll] New name for __builtins__Jason Orendorff jason.orendorff at gmail.com
Fri Nov 30 01:05:26 CET 2007
On Nov 29, 2007 11:54 AM, Guido van Rossum <guido at python.org> 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
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4