I have a Python class with a method which should accept arguments and keyword arguments this way
class plot: def __init__(self, x, y): self.x = x
You would use a different pattern:
def set_axis(self, *args, **kwargs): xlabel = kwargs.get('xlabel', 'x') ylabel = kwargs.get('ylabel', 'y')
This allows you to use * and ** while keeping the fallback values if keyword arguments aren't defined.