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
In your example, a is an instance, its __dict__ will include all variables set in its __init__ function. To get all class variables, use a.__class__.__dict__
a
__dict__
__init__
a.__class__.__dict__