I want to have a class that I can create subclasses of that has a print function that only prints on a particular condition.
Here\'s basically what I\'m trying to do
The standard way to pass on all arguments is as @JohnColeman suggested in a comment:
ClassWithPrintFunctionAndReallyBadName:
...
def print(self, *args, **kwargs):
if self.condition:
print(*args, **kwargs)
args
is a tuple of the non-keyword (positional) arguments, and kwargs
is a dictionary of the keyword arguments.