I've written some classes in Python and I have written docstrings for them like this:
class DB:
def execute_and_return(self, sql):
"""Execute the query and returns the result as a list of list
Parameters
----------
sql: str
Your query
Returns
-------
list""
If I want to access the docstring in another class I can simply call DB.execute_and_return.__doc__ and I get the string.
However if I'm interesting to know the name of the parameters (in this case sql) and the type of data (in this case str) is there any built in functions for accessing that?