Too much builtins (was Re: Python's simplicity philosophy

Ville Vainio ville.spammehardvainio at
Mon Nov 17 13:57:18 CET 2003

Alex Martelli <aleax at> writes:

[ locals() and globals() ]
> Why?  They only allow a limited form of introspection.  Why are
> they more essentially "built-in" than other stuff in inspect?

Somehow their existence in builtins has a connotation that we are
referring to the "current" namespace, instead of, say,
inspect.locals() (which might bear the connotation that we are talking
about locals of the module inspect).

I've mostly used locals() and globals() as "%(myvar)s" % locals(), and
never for inspect-ish tasks.

> > How about the wiki at
> Sure, one could write things up there, but I don't think it's a
> medium as suitable to debate as a newsgroup or mailing list.

Yes, it isn't. How about a "py3k-sig"?

Ville Vainio

More information about the Python-list mailing list