python how to add documentation

Solutions on MaxInterview for python how to add documentation by the best coders in the world

showing results for - "python how to add documentation"
Mario
26 Oct 2016
1class SimpleClass:
2    """Class docstrings go here."""
3
4    def say_hello(self, name: str):
5        """Class method docstrings go here."""
6
7        print(f'Hello {name}')
8
Paola
01 Jan 2020
1def say_hello(name):
2    print(f"Hello {name}, is it me you're looking for?")
3
4say_hello.__doc__ = "A simple function that says hello... Richie style"
5