I have the following function:
def my_func(): """My docstring is both funny and informative""" pass
How do I get access to the docstring?
Interactively, you can display it with
help(my_func)
Or from code you can retrieve it with
my_func.__doc__
1.4m articles
1.4m replys
5 comments
57.0k users