[Python-Dev] Deprecating builtin id (and moving it to sys())
skip at pobox.com
Sat Aug 20 04:32:12 CEST 2005
Guido> The built-in namespace is searched last for a reason -- the
Guido> design is such that if you don't care for a particular built-in
Guido> you don't need to know about it.
In my mind there are three classes of builtins from the standpoint of
overriding. Pychecker complains if you override any of them, but I think
that many times it does so unnecessarily. The first class includes those
builtins that you will likely find in many code samples and should just
never be overridden. For me these include "abs", "map", "list", "int",
"range", "zip", the various exceptions, etc. The second class of builtins
consists of objects or functions that are fairly special-purpose. You might
not really care if they are overridden, depending on context. For me this
class includes "compile", "id", "reload", "execfile", "ord", etc. Finally,
there is the subset of builtins that is included almost solely as a
convenience for use at the interpreter prompt. They include "quit", "exit"
and "copyright". I could care less if I override them in my code, and don't
think pychecker should either.
More information about the Python-Dev