Fix doctests in delta.py