Completed doctests in comp.py