问题:
python 如何打印函数名字?如何打印函数的注释?
解决:
- func_001.__name__
- func_001.__doc__
def func_001(): ''' 函数的作用: 打印 输入:无 输出: 123 ''' return 123 if __name__ == '__main__': print("正在执行函数的名字为:",func_001.__name__) print("执行函数的说明为:", func_001.__doc__) func_001()
参考资料:
https://www.cnblogs.com/ansver/p/10003727.html
https://blog.csdn.net/qq_43466807/article/details/100509852
标签:__,.__,打印函数,python,如何,001,func From: https://www.cnblogs.com/liqi175/p/16869981.html