> Levi wrote:
> > class Second:

Michele Cella wrote:
> This should be:
> class Second(controllers.Controller):
>
> even if ATM Controller does nothing it might do in the future so it's
> better to use it.

Thanks for the pointer. In general, I'm firmly in the YAGNI camp.

[1] http://fishbowl.pastiche.org/2004/03/02/defending_yagni
[2] http://xp.c2.com/YouArentGonnaNeedIt.html

I avoid extending anything I don't
a) understand and
b) absolutely have to.

My main motivation on this is laziness (hopefully it's the good kind).
If I extend controllers.Controller and don't want to be surprised by
unexpected bugs then I have to write extra tests. Since I don't really
know what controllers.Controller does, I can't test it without doing  a
fair amount of research first.

I'm digressing. My real question is "does it really matter?". The
ability to publish plain old python objects is what makes cherrypy so
appealing IMO. Does extending controllers.Controller in class Second
affect CherryPy and/or Turbogears in any way?

- Levi

Reply via email to