Hey again Any ideas how can I get the docstring from a module or function? I was hoping to do something like ast.get_docstring(node.pytype()) Thanks, Jarrad
Jarrad Hope <me@jarradhope.com> writes:
Any ideas how can I get the docstring from a module or function?
Once the code object is defined, its ‘__doc__’ attribute contains the docstring <URL:https://docs.python.org/3/glossary.html#term-docstring>. What happens when you use that? -- \ “The way to build large Python applications is to componentize | `\ and loosely-couple the hell out of everything.” —Aahz | _o__) | Ben Finney
hurr .. theres a .doc attribute of the node which has it all. sorry :) On Sun, May 3, 2015 at 12:15 PM, Ben Finney <ben+python@benfinney.id.au> wrote:
Jarrad Hope <me@jarradhope.com> writes:
Any ideas how can I get the docstring from a module or function?
Once the code object is defined, its ‘__doc__’ attribute contains the docstring <URL:https://docs.python.org/3/glossary.html#term-docstring>.
What happens when you use that?
-- \ “The way to build large Python applications is to componentize | `\ and loosely-couple the hell out of everything.” —Aahz | _o__) | Ben Finney
_______________________________________________ code-quality mailing list code-quality@python.org https://mail.python.org/mailman/listinfo/code-quality
participants (2)
-
Ben Finney -
Jarrad Hope