Hey everyone,
I have a set of classes which, when instantiated, take up a lot of memory. I'm trying to write a program which can inspect class attributes and methods given a list of classes, without actually instantiating them. Let's say I wanted to see if the following class had an attribute called "foo"
class Test(object):
foo=str()
bar=int()
I know I can do something like:
test=Test()
if test.f is not None:
print 'found'
However, is it possible to do this without instantiating Test? In reality, I need to do this with 10 objects, all of which are rather large and when instantiated, take up a great deal of memory and slow down my code.
Thanks