Perhaps a more idiomatic way of achieving the same thing is to use a factory function, which returns instances of different classes:
def PersonFactory(foo):
if foo:
return Person()
else:
return Child()
Apologies if the code is messed up, I'm posting from Google groups web UI.
--
http://mail.python.org/mailman/listinfo/python-list
