"""
# Chapter 4: Comments and Documentation
"""
"""
## Single line, inline and multiline comments
"""
"""
Comments are used to explain code when the basic code itself isn't clear.
Python ignores comments, and so will not execute code in there, or raise syntax errors for plain English sentences.
"""
"""
### Single line comment:
"""
"""
Single-line comments begin with the hash character (#) and are terminated by the end of line.
"""
#This is a single line comment in Python
"""
### Inline comment:
"""
print("Hello World") # This line prints "Hello World"
"""
### multiple lines comments 
"""
"""
Comments spanning multiple lines have """ or ''' on either end. This is the same as a multiline string, but
they can be used as comments:
"""
"""
This type of comment spans multiple lines.
These are mostly used for documentation of functions, classes and modules.
"""
"""
## Programmatically accessing docstrings
"""
"""
Docstrings are - unlike regular comments - stored as an attribute of the function they document, meaning that you
can access them programmatically.
"""
def func():
    """This is a function that does nothing at all"""
    return

print(func.__doc__)
"""
## Write documentation using docstrings
"""
"""
A docstring is a multi-line comment used to document modules, classes, functions and methods. It has to be the
first statement of the component it describes.
"""
def hello(name):
    """Greet someone.
    Print a greeting ("Hello") for the person with the given name.
    """
    print("Hello "+name)
class Greeter:
    """An object used to greet people.
    It contains multiple greeting functions for several languages
    and times of the day.
    """
help(hello)