def get_doc(self, module):
for node in module.body:
if isinstance(node, ast.ClassDef):
yield ast.get_docstring(node)
for sub_node in node.body:
if isinstance(sub_node, ast.FunctionDef):
yield ast.get_docstring(sub_node)
评论列表
文章目录