Next / Previous / Contents / TCC Help System / NM Tech homepage

4. The source code

The code for pyskip.py follows in literate programming style. The author is indebted to his colleague Dr. Allan M. Stavely for the concept of lightweight literate programming.

Development used the Cleanroom software development methodology.

4.1. Declarations

We'll start with a rudimentary documentation string for the module, pointing back to the online documentation:

pyskip.py
"""pyskip.py:  A container class for ordered sets in Python.

  Do not edit this file.  It is extracted automatically from the
  documentation:
    http://www.nmt.edu/tcc/help/lang/python/examples/pyskip/
"""

Next we'll need to import one of the Python standard modules, the random number generator:

pyskip.py
import random