Fix python3 doctests, error handling perfomance