import inspect


def getNumArgs(obj):
    """Return the number of "normal" arguments a callable object takes."""
    sig = inspect.signature(obj)
    return sum(1 for p in sig.parameters.values()
               if p.kind == inspect.Parameter.POSITIONAL_ONLY or
               p.kind == inspect.Parameter.POSITIONAL_OR_KEYWORD)