Lesson 3
Discovering your Paths
Chapter 10: Commenting
Style guide for comments
Python offers a style guide even for writing comments.
You can find this in the “Comments” section of the official PEP 8 Style Guide for Python Code
Please take a quick look at the “Comments” section of the document (it is quite short), and consider their points.
For this course:
- You should always include comments in your code (penalty to your coursework assignments if you do not leave any comments at all!)
- You should leave at least one space after a
#
. - Your comments must be readable.
- Your comments should be meaningful and informative, and not just stating the obvious (see previous page).
Otherwise, we will not be enforcing any further style guidelines as described in the official guide (although we do encourage you to consider them).