fix doctest for Python 3