为什么id
在Python中命名变量很不好?
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.)
通常,即使允许使用使用任何语言使关键字或内置函数都黯然失色的变量名也是一个坏主意。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句