代码中的f.__name__ +'()'是什么意思?有大神能详细解释一下吗,谢谢!
def f1(x): return x*2 def new_fn(f): def fn(x): print 'call'+f.__name__ +'()' #双下划线 return f(x) return fn g1=new_fn(f1) print g1(5)
def f1(x): return x*2 def new_fn(f): def fn(x): print 'call'+f.__name__ +'()' #双下划线 return f(x) return fn g1=new_fn(f1) print g1(5)
2017-09-17
举报