flake8 cleanup
libs/pprint flake8 cleanup
use isinstance rather than type, "exception as" syntax