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

Ron Adam rrr at ronadam.com
Thu Nov 29 06:11:47 CET 2007



Fred Drake wrote:
> On Nov 28, 2007, at 9:31 PM, Brett Cannon wrote:
>> +1 for either __root_namespace__ or __root__.
> 
> 
> What is it with nutrient extractors for plants that makes sense here?

Root is a word that takes on a specific meaning depending on the context. 
        Root as in tooth root, tree root, to root one self as in self 
defense, root of all evil, to root out.  etc...

In the case of python and name spaces, the context of __root__ would be 
suitably narrow so that the meaning would be clear and familiar with use.

Searching for "python __root__" would give good results as well.

In the case of a file or module name where it could be viewed out of 
context, it would be less suitable.  I think __builtin__ is fine for that. 
  Or __default_root__, as in the default root module to be placed in the 
__root__ name space.

Keeping __root__ relatively short has the benefit of being able to easily 
use "__root__.name" in the case where "name" was/is used in the local 
scope.  I don't see any reason to make it harder.  There might even be a 
use case for using all explicit __root__ references.


So +1 on __root__ for me for a name space designator.


Regards,
    Ron



> The goal is to make it blindingly obvious to someone reading code they  
> didn't write (or even that they did) what's going on.
 >
> +1 for __builtin_namespace__.
> 
> 
>    -Fred
> 


More information about the Python-Dev mailing list