Answers for "formatting doc strings in pytohn"

1

doc strings python

def calculator(a,b):
    """This function add's the input from user"""
    return a + b
#here in the above function from the start to the ending of double colon is a doc string
#we can say docstrings are description of your python function
print(calculator(5,5))
Posted by: Guest on June-26-2021
0

python best docstring format

"""
This is an example of Google style.

Args:
    param1: This is the first param.
    param2: This is a second param.

Returns:
    This is a description of what is returned.

Raises:
    KeyError: Raises an exception.
"""
Posted by: Guest on January-19-2021

Python Answers by Framework

Browse Popular Code Answers by Language