If I have the following class, what\'s the best way of getting the exact list of variables and methods, excluding those from the superclass?
class F
def getVariablesClass(inst): var = [] cls = inst.__class__ for v in cls.__dict__: if not callable(getattr(cls, v)): var.append(v) return var
if you want exclude inline variables check names on the __ at the start and the end of variable