When \"deconstructing\" a tuple, I can use _
to denote tuple elements I\'m not interested in, e.g.
>>> a,_,_ = (1,2,3)
>>> a
1
In order to avoid "unused variable" inspection messages for unused *args and/or **kwargs, I replace args
and kwargs
by _
and __
:
def f(a, b, *_, **__):
...
In addition to remove messages, it clearly shows that you don't care about these arguments.
I can't say if it is a really universal solution, but it worked everywhere I've used it until now.