Too much builtins (was Re: Python's simplicity philosophy
ville.spammehardvainio at spamtut.fi
Mon Nov 17 13:57:18 CET 2003
Alex Martelli <aleax at aleax.it> 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 python.org?
> 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 http://www.students.tut.fi/~vainio24
More information about the Python-list