MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / _getargspec

Function _getargspec

tensorflow/python/util/tf_inspect.py:55–77  ·  view source on GitHub ↗

A python3 version of getargspec. Calls `getfullargspec` and assigns args, varargs, varkw, and defaults to a python 2/3 compatible `ArgSpec`. The parameter name 'varkw' is changed to 'keywords' to fit the `ArgSpec` struct. Args: target: the target object to inspect.

(target)

Source from the content-addressed store, hash-verified

53 _getfullargspec = _inspect.getfullargspec # pylint: disable=invalid-name
54
55 def _getargspec(target):
56 """A python3 version of getargspec.
57
58 Calls `getfullargspec` and assigns args, varargs,
59 varkw, and defaults to a python 2/3 compatible `ArgSpec`.
60
61 The parameter name 'varkw' is changed to 'keywords' to fit the
62 `ArgSpec` struct.
63
64 Args:
65 target: the target object to inspect.
66
67 Returns:
68 An ArgSpec with args, varargs, keywords, and defaults parameters
69 from FullArgSpec.
70 """
71 fullargspecs = getfullargspec(target)
72 argspecs = ArgSpec(
73 args=fullargspecs.args,
74 varargs=fullargspecs.varargs,
75 keywords=fullargspecs.varkw,
76 defaults=fullargspecs.defaults)
77 return argspecs
78else:
79 _getargspec = _inspect.getargspec
80

Callers 1

getargspecFunction · 0.85

Calls 1

getfullargspecFunction · 0.85

Tested by

no test coverage detected