How do I access *args variable name(s) in __init__ method?
E.g.
class Parent:
def __init__(self, *args):
# How to access *args variable names here?
# In this example: foo, bar
pass
class Child(Parent):
def __init__(self, foo, bar):
super().__init__(foo, bar)
*args, like any other list, contains nothing but values. There's no guarantee that those values even came from variables, anyway - they could just as easily have been literals, or expressions.func.__code__.co_varnames