Idiomatic Python: use isinstance instead of type
Idiomatic Python: use in operator instead of method find
Merge pull request #2999 from ngrilly/python

Python