Python学习笔记#函数中使用文档,让你的函数更容易理解

 

>>> def intadd(a,b):
'this is a test of the doc of function'
return a+b

>>> intadd(2,3)
5
>>> intadd.__doc__
'this is a test of the doc of function'
>>>

 

posted on 2016-03-31 22:20  Lirh_china  阅读(200)  评论(0编辑  收藏  举报

导航