Is there a way to get the parameter names a function takes? def foo(bar, buz): pass magical_way(foo) == ["bar", "buz"]