s...@uce.gov writes: > > Perhaps you want those classes to inherit from your base class. Have > > you done the Python tutorial? It covers inheritance and how to use > > it. > > Yes, I have done subclasing before, and yes ThingyTypeA and B should > be subclassing Thingy
Then your example still gives no indication why inheritance (allowing the common behaviour to be in the base class), along with a factory function (allowing the input data to determine which class gets instantiated), is not sufficient. -- \ “When people believe that they have absolute knowledge, with no | `\ test in reality, this [the Auschwitz crematorium] is how they | _o__) behave.” —Jacob Bronowski, _The Ascent of Man_, 1973 | Ben Finney -- http://mail.python.org/mailman/listinfo/python-list