Python 3: Documenting modules
Question: I study how to document my code. So, I prepared a file docstrings.py and
placed it in a directory. Now I would like to have a look at what I
documented. In other words I want to type help(docstrings.square) and get the
documentation on square function in my module.

    
    
    >>> import sys
    >>> sys.path.append("C:\Users\Michael\PycharmProjects\Docstrings")
    

Result:

**SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in
position 2-4: truncated \UXXXXXXXX escape**

What's wrong?


Answer: Backslashes have to be doubled in [string
literals](http://docs.python.org/reference/lexical_analysis.html#string-
literals):

    
    
    >>> sys.path.append("C:\\Users\\Michael\\PycharmProjects\\Docstrings")
    

Unless you use a _raw string_ :

    
    
    >>> sys.path.append(r"C:\Users\Michael\PycharmProjects\Docstrings")
    

