双下划线的模式方法总结

函数:

1 def show(l=[],s='a',d={}):
2     '''test'''
3     return
4 
5 print(show.__name__)
6 print(show.__defaults__)
7 print(show.__doc__)

 

函数的结果:

1 show
2 ([], 'a', {})
3 test

 

posted @ 2018-09-14 17:50  JerryZao  阅读(156)  评论(0编辑  收藏  举报