Next / Previous / Shipman's Home Sweet Homepage / Site map

Cleanroom examples: skiplist.py, a container class

The Python language seems to adapt easily to Cleanroom techniques; see the TCC Python page for more information about Python.

The author translated his Icon SkipList object into Python and verified it, and there are no known bugs.

The Python version is not functionally identical to the Icon version because Python does not have generators (see `Python and the Icon programming language').

Instead, it was necessary to introduce the idea of a ``cursor'' that points to a record in the sequence, and provide first(), next(), and find() methods that move that cursor. I think that Icon's generators make the generic find operation much cleaner, because it doesn't require this cursor---the Icon find() method just generates the qualifying records.


Next: Cleanroom examples: xhue.py, a GUI application
See also: Example programs written in Cleanroom style
Previous: Cleanroom examples: Prime number testing
Site map
John W. Shipman, john@nmt.edu
Last updated: 1998/02/28 23:30:01
URL: http://www.nmt.edu/~shipman/soft/clean/pyskip.html