[Python-Dev] Deprecating builtin id (and moving it to sys())

Anthony Baxter anthony at interlink.com.au
Sat Aug 20 10:48:11 CEST 2005

On Friday 19 August 2005 02:22, Guido van Rossum wrote:
> On 8/17/05, Anthony Baxter <anthony at interlink.com.au> wrote:
> > If you _really_ want to call a local variable 'id' you can (but
> > shouldn't).
> Disagreed. The built-in namespace is searched last for a reason -- the
> design is such that if you don't care for a particular built-in you
> don't need to know about it.

I'm not sure what you're disagreeing with. Are you saying you _can't_ call
a variable 'id', or that it's OK to do this?

> > You also can't/shouldn't call a variable 'class', 'def', or 'len' -- but
> > I don't see any movement to allow these...
> Please don't propagate the confusion between reserved keywords and
> built-in names!

It's not a matter of 'confusion', more that there are some names you can't
or shouldn't use in Python. When coding twisted, often the most obvious 
'short' name for a Deferred is 'def', but of course that doesn't work. 


More information about the Python-Dev mailing list