For example:
def foo(length, width):
"""Short desc.
Arguments:
length -- A desc.
width -- A desc.
"""
Note how I have added an extra space after “width”.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I don’t think there is a convention about this. All PEP 257 says about the docstring of a function is
The only example given in the PEP also doesn’t shed light on the matter:
I usually do align the dashes, but I don’t think there is a general convention.