Keeping track of subclasses and instances?

Larry Bates larry.bates at websafe.com
Thu Oct 11 03:08:19 CEST 2007


Karlo Lozovina wrote:
> Hi,
> 
> what's the best way to keep track of user-made subclasses, and instances of
> those subclasses? I just need a pointer in a right direction... thanks.
> 
I'm not completely sure I understand the question but here goes.  Instances of 
classes are classes can be stored in lists or dictionaries.  In lists you 
reference them via their index (or iterate over them) and in dictionaries you 
can give them a name that is used as a key.

Hope this helps.

-Larry



More information about the Python-list mailing list