class SimpleClass(object):
def A(self, *args):
...
def B(self, *args):
...
def C(self, *args):
...
Is there anyway to catch the arguments passed to A, B, C, modify those arguments and pass the modified arguments onto A, B, C without having to modify the existing code ?
Edit:
Answer: use a class decorator, that decorates all methods of the class with another decorator.
The method decorator performs the pre-processing.
Try this:
Though if you can change your
SimpleClass
I'd suggest using decorator like so: