Really, the title says it all. Is there any way to compile all the instances of a class into a list, or other such data structure?
Jump to Post
I have done this on occasion. The easiest way to do this is have your __init__() routine append self to a list. If it's not "your" class I suppose you could override the __init__ method of the class.
Fortunately I never had to worry about deletes...
All 4 RepliesReply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.