This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: Rename __builtins__ to __root_namespace__?
Type: Stage:
Components: Versions: Python 3.0
Status: closed Resolution: duplicate
Dependencies: Superseder: Rename __builtin__ to builtins
View: 1535
Assigned To: Nosy List: christian.heimes, gvanrossum, rhettinger
Priority: normal Keywords:

Created on 2007-11-26 17:50 by gvanrossum, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (7)
msg57842 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2007-11-26 17:50
In 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.
msg57843 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2007-11-26 18:30
A simple replace with sed -i works just fine. Afterwards the code needs
only minor adjustments and cleanups.

find -name \*.py -or -name \*.c -or -name \*.h | xargs sed -i 
msg57844 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2007-11-26 18:32
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?
msg57845 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2007-11-26 18:44
msg57848 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2007-11-26 19:04
Time for a quick poll on the list.
msg57863 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2007-11-27 00:30
FWIW, I find __root__ to be just right.  It is not subject 
misspelling.  It is distinct enough to serve as a mental link to a 
specific concept.  The leading and trailing underscores cause just 
enough typing pain that I wouldn't want anything longer.
msg58048 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2007-12-01 14:07
See for future discussion.
Date User Action Args
2022-04-11 14:56:28adminsetgithub: 45839
2008-01-06 22:29:44adminsetkeywords: - py3k
versions: Python 3.0
2007-12-01 14:07:42christian.heimessetstatus: open -> closed
resolution: duplicate
superseder: Rename __builtin__ to builtins
messages: + msg58048
2007-11-30 06:52:09georg.brandllinkissue1774369 superseder
2007-11-27 00:30:39rhettingersetnosy: + rhettinger
messages: + msg57863
2007-11-26 19:04:51gvanrossumsetmessages: + msg57848
2007-11-26 18:44:42christian.heimessetmessages: + msg57845
2007-11-26 18:32:13gvanrossumsetmessages: + msg57844
2007-11-26 18:30:07christian.heimessetmessages: + msg57843
2007-11-26 18:21:30christian.heimessetkeywords: + py3k
nosy: + christian.heimes
2007-11-26 17:50:43gvanrossumcreate