对于Python的魔术方法 __code__
#coding=utf-8
def func1(arg1,arg2,arg3):
return arg1 + arg2
print dir(func1.__code__)<span style="white-space:pre"> </span> #查看可以用到的所有魔术方法
print func1.__code__.co_varnames #可以输出目标方法的所有变量名
print func1.__code__.co_filename #可以输出目标方法在那个文件里