classes + modules

Adonis Vargas deltapigz at telocity.com
Tue Apr 16 00:27:46 EDT 2002


is there any way to initialize a class then get the initialized class name
and put it into a list then later on calling it from the list as if it were
the class?

i.e.

class_list = []
from somemodule import *
x = someclass()
class_list.append(x)

then do

class_list[0].somefunction() # assuming x is position at 0


any help would greatly be appreciated.

Adoni





More information about the Python-list mailing list