Movatterモバイル変換
[0]ホーム
[Python-Dev] Deprecating builtin id (and moving it to sys())
Jeremy Hyltonjeremy at alum.mit.edu
Wed Aug 17 18:37:42 CEST 2005
I'd like to see the builtin id() removed so that I can use it as alocal variable name without clashing with the builtin name. Icertainly use the id() function, but not as often as I have a localvariable I'd like to name id. The sys module seems like a naturalplace to put id(), since it is exposing something about theimplementation of Python rather than something about the language; thelanguage offers the is operator to check ids.Jeremy
More information about the Python-Devmailing list
[8]ページ先頭