Change parameters of a function in Python -
is possible (and if so, how) change parameters of function after definition?
example:
from inspect import signature def f(a, b, c): print(a + b + c) in signature(f).parameters: print(i) changeparameters(f, "d", "e") print() in signature(f).parameters: print(i) would output:
a b c d e
just re def function name new parameters - since not used original need anyway.
Comments
Post a Comment