Keeping track of subclasses and instances?
Larry Bates
larry.bates at websafe.com
Wed Oct 10 21:08:19 EDT 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