Check in for an instance of a class

Ben Graham musk_ben at
Tue Dec 25 22:25:22 EST 2001

 I need to check whether an instance of a particular class exists, in
its __init__(...). Assuming that the module containing the class may
or may not be imported, what are the my options? (As far as possible,
I would like to contain the test in the class completely). And, yes, I
need a pre-2.2 solution.


More information about the Python-list mailing list