classification
Title: Unify __builtins__ -> __builtin__
Type: Stage:
Components: Interpreter Core Versions: Python 3.0
process
Status: closed Resolution: rejected
Dependencies: Superseder: Rename __builtins__ to __root_namespace__?
View: 1498
Assigned To: Nosy List: christian.heimes, gvanrossum
Priority: normal Keywords: patch

Created on 2007-08-14 22:35 by christian.heimes, last changed 2008-01-06 22:29 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
builtin.patch christian.heimes, 2007-08-14 22:35
Messages (4)
msg53026 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2007-08-14 22:35
The patch renames __builtins__ to __builtin__ in the C and Python sources and renames builtins to builtin in the C code.

Missing:

 * documentation update
 * 2to3 fixer
msg53027 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2007-08-18 20:34
Thanks!

(Though I wish you'd left the C variable names alone, the patch is unnecessarily big this way.)

I am also wondering about some semantic endcases; in 2.x, it is *possible* to have __builtin__ and __builtins__ point to different place, and I am going to do some soul-searching to make sure that's not a loss of functionality.

No need to update the patch, I just have to think about it some more.
msg53028 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2007-08-19 13:50
Personally I prefer to have one and just one way to spell a variable. I'd find it confusing to have __builtin__ (singular form) but a C variable named builtins (plural form). I changed it for aesthetic and consistency reasons. 
msg55452 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2007-08-30 00:26
I've thought this over very carefully, and I want something different --
I want to keep both concepts, but I want to rename __builtins__ to
__rootns__  (i.e. Root namespace), indicating its purpose.  This will
prevent further confusion while not conflating the two different features.
History
Date User Action Args
2008-01-06 22:29:45adminsetkeywords: - py3k
versions: Python 3.0
2007-11-30 06:52:09georg.brandlsetsuperseder: Rename __builtins__ to __root_namespace__?
2007-08-30 00:26:11gvanrossumsetstatus: open -> closed
resolution: rejected
messages: + msg55452
2007-08-30 00:23:12gvanrossumsetversions: + Python 3.0
2007-08-14 22:35:14christian.heimescreate