On Dec 18, 4:36 am, "psaff...@googlemail.com"
wrote:
> On 17 Dec, 20:33, "Chris Rebert" wrote:
>
> > superclass = TraceablePointSet if tracing else PointSet
>
> Perfect - many thanks. Good to know I'm absolved from evil, also ;)
>
> Peter
Another way would be to have a factory function that buil
On 17 Dec, 20:33, "Chris Rebert" wrote:
> superclass = TraceablePointSet if tracing else PointSet
>
Perfect - many thanks. Good to know I'm absolved from evil, also ;)
Peter
--
http://mail.python.org/mailman/listinfo/python-list
On Wed, Dec 17, 2008 at 6:41 AM, psaff...@googlemail.com
wrote:
> This might be a pure OO question, but I'm doing it in Python so I'll
> ask here.
>
>
> The problem is that IDPointSet and MicroArrayPointSet will need to
> inherit from PointSet or TraceablePointSet based on whether I'm
> handling
Marco Mariani wrote:
I think you should investigate something different than subclassing,
like a "Strategy" domain pattern or something similar.
s/domain/design/
--
http://mail.python.org/mailman/listinfo/python-list
psaff...@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