id为什么在 Python中命名变量是不好的?
id
id()是一个基本的内置:
id()
id模块 内置函数的帮助__builtin__: id(...) id(object) -> integer Return the identity of an object. This is guaranteed to be unique among simultaneously existing objects. (Hint: it’s the object’s memory address.)
id模块 内置函数的帮助__builtin__:
__builtin__
id(...) id(object) -> integer Return the identity of an object. This is guaranteed to be unique
among simultaneously existing objects. (Hint: it’s the object’s memory address.)
通常,即使允许,在任何语言中使用使关键字或内置函数黯然失色的变量名都是一个坏主意。