[Twisted-web] DOM manipulation in an athena widget

Phil Mayers p.mayers at imperial.ac.uk
Mon Oct 2 11:45:01 CDT 2006

Jean-Paul Calderone wrote:
> I wonder why you chose to make those three functions free instead of
> methods of your widget class?

Conceptually, one might have multiple different widgets wanting the 
editable span functionality which cannot easily share a base class, and 
also since I'm told Athena does very little client-side DOM work, to 
separate out the athena-specific code from the client-side DOM code.

But it would have worked just as well on the widget.

Third reason - VIMs syntax highlighting fails for encapsulated functions 
but works for bare ones :o)

More information about the Twisted-web mailing list