Made doctest python3 compatible.