(fn)
return _FullArgSpec(
      args=arg_spec.args,
      varargs=arg_spec.varargs,
      varkw=arg_spec.keywords,
      defaults=arg_spec.defaults,
      kwonlyargs=[],
      kwonlydefaults=None,
      annotations={})
Python 2/3 compatible version of the inspect.getfullargspec method.

  Args:
    fn: The function object.

  Returns:
    A FullArgSpec. For Python 2 this is emulated by a named tuple.
Python 2/3 compatible version of the inspect.getfullargspec method.
Python 2 / 3 compatible version of the inspect . getfullargspec method .
def _getfullargspec(fn):
  """Python 2/3 compatible version of the inspect.getfullargspec method.

  Args:
    fn: The function object.

  Returns:
    A FullArgSpec. For Python 2 this is emulated by a named tuple.
  """
  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__)
  if six.PY3:
    assert isinstance(arg_spec, _FullArgSpec)
    return arg_spec
  return _FullArgSpec(
      args=arg_spec.args,
      varargs=arg_spec.varargs,
      varkw=arg_spec.keywords,
      defaults=arg_spec.defaults,
      kwonlyargs=[],
      kwonlydefaults=None,
      annotations={})
def _getfullargspec ( fn ) : 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__ ) if six . PY3 : assert isinstance ( arg_spec , _FullArgSpec ) return arg_spec return _FullArgSpec ( args = arg_spec . args , varargs = arg_spec . varargs , varkw = arg_spec . keywords , defaults = arg_spec . defaults , kwonlyargs = [ ] , kwonlydefaults = None , annotations = { } )