**kwargs
takes keyword arguments, not a dictionary:
obj = MyClass(
API_KEY,
API_SECRET,
OAUTH_TOKEN,
OAUTH_TOKEN_SECRET,
data=DATA
)
Of course, you can use the **kwargs
call convention to have your dictionary be applied as keyword arguments still:
obj = MyClass(
API_KEY,
API_SECRET,
OAUTH_TOKEN,
OAUTH_TOKEN_SECRET,
**{'data': DATA}
)
Wether or not you pack the rest of the arguments into the keyword arguments depends entirely on the original method on BaseClass
; does it accept those arguments as keyword arguments? In Python 3 that is not necessarily a given, nor do built-in (C defined) functions and methods always accept keyword arguments instead of positional arguments.