Commands

Stable release

Objectives

  • Understand how static site generators build websites out of plain text files.

  • Create example Sphinx documentation and learn some Markdown along the way.

Note

sphinx-autobuild content/ _build/

Questions

  • Do you have any questions?

Warning

Do not use comments for:

Keeping zombie code

# Do not run this code!:
# if temperature > 0:
#     print('It is warm')

In-code-1: Comments

Let’s take a look at two example comments (comments in python start with #):

Comment A

# Now we check if temperature is larger then -50:
if temperature > -50:
    print('do something')

Comment B

# We regard temperatures below -50 degrees as measurement errors
if temperature > -50:
    print('do something')

Which of these comments is best? Can you explain why?