python 如何判断函数有没有描述文档
发布网友
发布时间:2022-04-25 12:53
我来回答
共2个回答
热心网友
时间:2024-07-31 10:55
什么意思?是说文档存不存在吗?
热心网友
时间:2024-07-31 10:59
用__doc__属性,比如:
>>> import os
>>> print os.makedirs.__doc__
makedirs(path [, mode=0777])
Super-mkdir; create a leaf directory and all intermediate ones.
Works like mkdir, except that any intermediate path segment (not
just the rightmost) will be created if it does not exist. This is
recursive.
>>>