python3 types and isinstance for type-checking
swap s out for  tests for python3
pythonify a bit
python3 support