You're right, I didn't know how to do doctests.  Fixing some, adding more.  Adding continued_fraction_iterator(Rational(-3,8)) to show the (fixed) bug mentioned above (should expand to [-1, 1, 1, 1, 2]).  Also expanding docstrings, hopefully not too much.