[Python-Dev] Deprecating builtin id (and moving it to sys())
Christian Robottom Reis
kiko at async.com.br
Wed Aug 17 16:02:18 CEST 2005
In Launchpad (mainly because SQLObject is used) we end up with quite a
few locals named id. Apart from the fact that naturally clobbering
builtins is a bad idea, we get quite a few warnings when linting
throughout the codebase. I've fixed these as I've found them, but today
Andrew pointed out to me that this is noted in:
I wonder: is moving id() to sys doable in the 2.5 cycle, with a
deprecation warning being raised for people using the builtin? We'd then
phase it out in one of the latter 2.x versions.
I've done some searching through my code and id() isn't the most-used
builtin, so from my perspective the impact would be limited, but of
course others might think otherwise.
Is it worth writing a PEP for this, or is it crack?
Christian Robottom Reis | http://async.com.br/~kiko/ | [+55 16] 3376 0125
More information about the Python-Dev