You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
inspect: Implement a very basic signature function.
This implements a very basic `inspect.signature()` function.
At the moment it returns only a simple `Signature` instance with a
`parameters` attribute that holds an `OrderedDict` whose length matches the
arity of the input function (the number of arguments it takes).
So, the following code works and is compatible with CPython:
def f(a, b, *, c):
pass
print(len(inspect.signature(f).parameters))
That should print 3.
Signed-off-by: Damien George <damien@micropython.org>
0 commit comments