Closed jbytecode closed 2 months ago
My one.py
is
def mysum(a, b):
"""
Returns sums of two numbers
"""
return a + b
and suppose we are in the Python REPL:
hako@hako-hp /tmp> python3
Python 3.12.3 (main, Apr 10 2024, 05:33:47) [GCC 13.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from one import mysum
>>> help(mysum)
the line with help(mysum)
displays
Help on function mysum in module one:
mysum(a, b)
Returns sums of two numbers
so I think the documentation should be placed at the first row of the function/class body.
@SevgiAkten - please feel free to close the issue when it's completely resolved.
I think this issue is completely resolved and I'm closing.
Letting the code is
in its current form, the code doesn't have comments. Consider adding Python comments like
Since Python has several commenting methods, it would be nice to take a look at some documentations:
https://www.w3schools.com/python/python_comments.asp