Obviously, that's not what's going on in Python...
It could be smoother and more generic if Haskell permitted specifying defaulting for non-numeric types. But it does support things like:
*Main> 2 < 3 < 4 < 4 :: Bool False *Main> 2 < 3 < 4 <= 4 :: Bool True *Main> 2 <= 3 < 4 <= 4 :: Bool True *Main> 2 <= 3 > 4 <= 4 :: Bool False *Main> 2 <= 6 > 4 <= 4 :: Bool True
Obviously, that's not what's going on in Python...
It could be smoother and more generic if Haskell permitted specifying defaulting for non-numeric types. But it does support things like: