> needs isinstance(o, int) or isinstance(o, long), or float... although Maybe I'm wrong, but can't you use isinstance(o, (int, long, float)), for instance ? And the benefits of such changes would be greater than the effort to do it ?