Erik Max Francis
max at alcyone.com
Mon Mar 20 00:07:10 CET 2006
> I know how to use a class factory - and could work around using such a
> mechanism. However I am interested to know if I could let the classes do the
> work by themselves.
You can, but a class factory is going to be much clearer and probably
more maintainable. From the user's perspective, there's no difference
from calling a class A to instantiate it, and calling a factory function
called A that selects the appropriate class and returns an instance of it.
Erik Max Francis && max at alcyone.com && http://www.alcyone.com/max/
San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis
Never had very much to say / Laugh last, laugh longest
More information about the Python-list