With new-style classes you can find out a class' subclasses and then
you can instantiate the subclass you want. Suppose you have two classes
A and B, B is a subclass of A, A is a new-style class. Now you have an
A's instance called "a", to instance B you can do the following:

b = a.__class__.__subclasses__()[0]()

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to