def _is_int(x):
 return (isinstance(x, int) or str(x).isdigit())

def _is_int ( x ) : return ( isinstance ( x , int ) or str ( x ) . isdigit ( ) )
test whether the argument can be serialized as an integer .