doctests for constructor.py