Keeping track of subclasses and instances?
Steven D'Aprano
steve at REMOVE-THIS-cybersource.com.au
Wed Oct 10 22:54:50 EDT 2007
On Thu, 11 Oct 2007 03:19:07 +0200, Karlo Lozovina wrote:
> Here is a longer description - I have a function that given input
> creates a custom class and returns it back. The user is free to subclass
> that (even more, he should do that), and of course he will make
> instances of those subclasses. Now, my question is how to keep track of
> subclasses and their instances, without the need for user interaction
> (appending them to a list, or adding to dictionary)?
The real question is why you think you need to keep track of them instead
of letting the user and/or Python keep track of them, like any other
object.
--
Steven.
More information about the Python-list
mailing list