a python port of haskell's QuickCheck