Movatterモバイル変換
[0]ホーム
[Python-Dev] Deprecating builtin id (and moving it to sys())
Christian Robottom Reiskiko at async.com.br
Wed Aug 17 16:02:18 CEST 2005
In Launchpad (mainly because SQLObject is used) we end up with quite afew locals named id. Apart from the fact that naturally clobberingbuiltins is a bad idea, we get quite a few warnings when lintingthroughout the codebase. I've fixed these as I've found them, but todayAndrew pointed out to me that this is noted in:http://www.python.org/doc/essays/ppt/regrets/PythonRegrets.pptI wonder: is moving id() to sys doable in the 2.5 cycle, with adeprecation warning being raised for people using the builtin? We'd thenphase it out in one of the latter 2.x versions.I've done some searching through my code and id() isn't the most-usedbuiltin, so from my perspective the impact would be limited, but ofcourse others might think otherwise.Is it worth writing a PEP for this, or is it crack?Take care,--Christian Robottom Reis |http://async.com.br/~kiko/ | [+55 16] 3376 0125
More information about the Python-Devmailing list
[8]ページ先頭