If I have a class as follows:
class myclass(object):
i = 20
j = 30
k = 40
def __init__(self):
self.myvariable = 50
How can I get the list which contains i, j and k? (static members of the class) I have tried to use the:
[x for x in dir(a) if isinstance(getattr(a, x), (int, long))]
however that also returns the self.myvariable. Is there a way to perform this on an instance aswell as a class type?