Two things:
- If you want to have named arguments, that's fine; define your function with them:
def main(name, nickname, phone):
; and - For docstrings, the format isn't
#
(comment), it's"""
(multiline string).
For example:
def myfunc(name, age, height):
"""Returns a growth-rate for the person based on age and height."""
return height / age
Now the "tooltip" reads:
(name, age, height)
Returns a growth-rate for the person based on age and height.
If you don't want any named arguments to be shown, you can use *args
:
def myfunc(*args):
"""Takes three arguments: name, age and height, returns a growth rate."""
name, age, height = args
return height / age
Now the tooltip is:
(...)
Takes three arguments: name, age and height, returns a growth rate.