hex.py: fixed doctests