Movatterモバイル変換
[0]ホーム
[Python-Dev] Deprecating builtin id (and moving it to sys())
Anthony Baxteranthony at interlink.com.au
Thu Aug 18 06:09:16 CEST 2005
On Thursday 18 August 2005 00:02, Christian Robottom Reis wrote:> 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'm neutral on putting id() also into sys. I'm -1 on either issuing adeprecation warning or, worse yet, removing the id() builtin. The warningssystem is expensive to call, and I know from a brief look at a bunch of codethat I use id() inside some tight inner loops. Removing it entirely is gratuitous breakage, for a not very high payoff. Ifyou _really_ want to call a local variable 'id' you can (but shouldn't). You also can't/shouldn't call a variable 'class', 'def', or 'len' -- but Idon't see any movement to allow these...Anthony-- Anthony Baxter <anthony at interlink.com.au>It's never too late to have a happy childhood.
More information about the Python-Devmailing list
[8]ページ先頭