I support PEP 326

Jeremy Fincher tweedgeezer at hotmail.com
Wed Jan 28 10:26:25 EST 2004


Anthony Baxter <anthony at interlink.com.au> wrote in message news:<mailman.884.1075263037.12720.python-list at python.org>...
> >>> len(dir(__builtins__))
> 125
> 
> That's a _lot_ of stuff in one module. Even if you exclude the 40-odd 
> exceptions that are there, that's still a lot of guff in one big flat
> namespace.

There certainly is, but are the mistakes of the past going to doom us
to put things in the wrong place until we get to clean it up?  I think
the one appropriate place for the proposed constants is __builtins__,
for the obvious reasons that (a) all other singleton constants are
there (None, True, False) and (b) ease of implementation of cmp (with
Maximum and Minimum in __builtins__, it's a 5-line change, I read on
Python-dev).

Yes, __builtins__ is bloated, but as Mr. Holl mentioned, a significant
amount of it can be removed once Guido's willing to break
backwards-compatibility.  But why make 3.0 even more
backwards-incompatible than it is now by sticking rightful builtins
somewhere else just to keep the builtin namespace artificially
smaller?

(Or consider this: as a native speaker of English, I have a working
vocabulary of tens of thousands of English words, and a non-working
vocabulary in the hundreds of thousands.  Do people really believe
that the difference between 125 and 127 (or 150, or 200) builtins is
going to increase my cognitive load significantly?)

Jeremy



More information about the Python-list mailing list