在这段代码中,_after 的含义是什么for?
if tbh.bag:
n = 0
for _ in tbh.bag.atom_set():
n += 1
Run Code Online (Sandbox Code Playgroud) 我在Python 2.7中创建了这个函数ipython:
def _(v):
return v
Run Code Online (Sandbox Code Playgroud)
以后,如果我打电话_(somevalue),我会_ = somevalue.
in[3]: _(3)
out[3]: 3
in[4]: print _
out[4]: 3
Run Code Online (Sandbox Code Playgroud)
功能消失了!如果我打电话给_(4)我:
TypeError: 'int' object is not callable`
Run Code Online (Sandbox Code Playgroud)
为什么?这个功能出了什么问题?