Overview -h.schools.nsw.edu.au



Task 6: Notes on documenting your program

Self-documenting code

Check the names you have used for all functions and variables. Is the purpose clear from the name?

Comments

Your code must be fully commented, including:

• A documentation string for the whole program, containing details of the author, the version, and how to use the program. You can

• A documentation string for each function you have written.

• You should write thoughtful comments for each line of code. Remember you are explaining your code to other human beings. Don’t simply re-state what the code is doing literally. Professional programmers don’t usually comment every line, but as a student, you need to learn the discipline.

Style

Read the Python Style Guide (PEP 8) and Docstring Conventions (PEP 257). You may skim the parts discussing Object Oriented programming.

Check that your code conforms to the conventions laid down in these documents.

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download