Skip to content
Advertisement

Tag: python-datamodel

How to get method parameter names?

Given that a function a_method has been defined like Starting from a_method itself, how can I get the argument names – for example, as a tuple of strings, like (“arg1”, “arg2”)? Answer Take a look at the inspect module – this will do the inspection of the various code object properties for you. The other results are the name of

Advertisement