Selecting a different superclass
Marco Mariani
marco at sferacarta.com
Wed Dec 17 11:06:49 EST 2008
psaffrey at googlemail.com wrote:
> The problem is that IDPointSet and MicroArrayPointSet will need to
> inherit from PointSet or TraceablePointSet based on whether I'm
> handling traceable points or not. Can I select a superclass
> conditionally like this in Python? Am I trying to do something really
> evil here?
>
> Any other bright ideas on my application also welcome.
I think you should investigate something different than subclassing,
like a "Strategy" domain pattern or something similar.
More information about the Python-list
mailing list