"Sagari" <[EMAIL PROTECTED]> writes: > $a = 'b'; > $obj =& new $a(); // instantiating class b()
Classes are first class objects in python: class b: ..... # define class b We could assign the class object to a variable a = b and make an instance: obj = a() # same as "obj = b()" Continuing that example we could make a dispatch table of classes: class b: ... class c: ... class d: ... table = [b, c, d] # 3 element array, each element is a class i = 1 a = table[i] # this means a = c obj = a() # instantiate c -- http://mail.python.org/mailman/listinfo/python-list