Skip to content

Instantly share code, notes, and snippets.



Created Jul 11, 2018
What would you like to do?
[Python] Inspect params inside a function
import inspect
frame = inspect.currentframe()
args, _, _, values = inspect.getargvalues(frame)
print('function name "%s"' % inspect.getframeinfo(frame)[2])
for i in args:
print(" %s = %s" % (i, values[i]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment