Is there a good one-stop-shop Python reference for choosing attributes to use with hasattr() to identify types.
For example, the following is for a sequence which is not a string:
def is_sequence(arg):
return (not hasattr(arg, "strip") and
hasattr(arg, "__getitem__") or
hasattr(arg, "__iter__"))
It would be nice to have a solid reference for choosing the best patterns quickly.