-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path29-python-docstrings.py
More file actions
48 lines (32 loc) · 901 Bytes
/
29-python-docstrings.py
File metadata and controls
48 lines (32 loc) · 901 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
import local_modules.module_docstrings as module_docstrings
def hello(arg):
"""This is the docstring of the hello function"""
print("Hello", arg, "!")
hello("John")
help(hello)
class Class:
"""This is the docstring of the class Class"""
def __init__(self):
"""This is the docstring of init method of Class"""
pass
def method(self):
"""This is the docstring of a method of Class"""
pass
cls = Class()
help(cls)
module_docstrings.hello()
module_docstrings.good_bye()
help(module_docstrings)
print(dir(module_docstrings))
print(module_docstrings.__name__)
print(module_docstrings.__package__)
print(module_docstrings.__doc__)
help(print)
help(len)
# pydoc -w module_name
# pydoc -w package_name
# pydoc -w package_name .\
# pydoc -b
# pydoc -p 8000
# epydoc http://epydoc.sourceforge.net/
# sphinx https://www.sphinx-doc.org/en/master/