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

Steve Holden steve at holdenweb.com
Wed Nov 28 17:55:01 CET 2007


Christian Heimes wrote:
> I'm sending this mail to Python-dev in the hope to reach more developers.
> 
> GvR likes to rename the __builtin__ to reduce confusing between
> __builtin__ and __builtins__. He wanted to start a poll on the new name
> but apparently he forgot.
> 
>>From http://bugs.python.org/issue1498
> ---
> In http://bugs.python.org/issue1774369 I mentioned that I wanted to
> rename __builtins__ to __rootns__.  Though right now I think something
> longer and less cryptic might be better.  The reason is to avoid for
> once and for all the confusion between __builtin__, which is a module,
> and __builtins__, a feature mainly used by sandboxing to pass the set of
> builtins to be used via the global namespace.  This lay at the heart of
> the referenced bug.
> 
> I'm still in favor of this but haven't had the time to investigate how
> much work it would be.
> [...]
> OK, then we need to agree on a new name. I find __root__ too short,
> __rootns__ too cryptic, and __root_namespace__ too long. :-) What else
> have we got?
> ---
> 
> What name do you prefer? I'm +1 with Raymond on __root__ but I'm still
> open for better suggestions.
> 
The namespace should really be called __global__. I doubt this will fly, 
because it's too radical, and unfortunately would undermine the "global" 
keyword, used in 2.x to indicate that a name should be sought in the 
module namespace.

I doubt many people would want to replace "global" with "module".

What's it being replaced with in 3.x?

regards
  Steve
-- 
Steve Holden        +1 571 484 6266   +1 800 494 3119
Holden Web LLC              http://www.holdenweb.com/



More information about the Python-Dev mailing list