gin/config.py
def _get_cached_arg_spec(fn):
  """Gets cached argspec for `fn`."""

  arg_spec = _ARG_SPEC_CACHE.get(fn)
  if arg_spec is None:
    arg_spec_fn = inspect.getfullargspec if six.PY3 else inspect.getargspec
    try:
      arg_spec = arg_spec_fn(fn)
    except TypeError:
      # `fn` might be a callable object.
      arg_spec = arg_spec_fn(fn.__call__)
    _ARG_SPEC_CACHE[fn] = arg_spec
  return arg_spec
def _get_cached_arg_spec(fn):
  """Gets cached argspec for `fn`."""

  arg_spec = _ARG_SPEC_CACHE.get(fn)
  if arg_spec is None:
    arg_spec_fn = inspect.getfullargspec if six.PY3 else inspect.getargspec
    try:
      arg_spec = arg_spec_fn(fn)
    except TypeError:
      # `fn` might be a callable object.
      arg_spec = arg_spec_fn(fn.__call__)
    _ARG_SPEC_CACHE[fn] = arg_spec
  return arg_spec
Gets cached argspec for `fn`.