On 2/7/06, Alberto <[EMAIL PROTECTED]> wrote: > class MyWidget(Widget): > template = """ > <tag xmlns:py="http://purl.org/kid/ns#" name="${name}"> > <p py:for="i in xrange(count)">I will not repeat myself!</p> > </tag> > """" > template_vars = ["name", "count"] > > > As "name" is already listed as a template_var at Widget, there's no > real need to list it at this subclass, but, as it's template uses it, > listing it here makes clearer that the variable comes from the widget > instance and that it can be overriden via display() (without even > looking at the template).
I think I like the way you implemented it, and the lack of a need to repeat this. This is something to keep in mind for the widget browser: let *it* figure out which variables are available. Kevin

