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
In Python 3 this works:
Python 3.2.3 (default, Oct 19 2012, 19:53:16)
>>> def set_axis(self, *args, xlabel="x", ylabel="y", **kwargs):
... print(args, xlabel, ylabel, kwargs)
...
>>> set_axis(None, "test1", "test2", xlabel="new_x", my_kwarg="test3")
('test1', 'test2') new_x y {'my_kwarg': 'test3'}
>>>