As a Python programmer who's doing some web development, this feels
very unnatural:
> class ContactFields(WidgetsDeclaration):
> TextField(name="age")
> TextField(name="name")
Whether it's legal or not, I gave up on Zope in favor of TG because
Zope was too clever for me. :) I would still prefer
class ContactFields(WidgetsDeclaration):
age = TextField(name="age")
name = TextField(name="name")
even though it violates DRY, or
class ContactFields(WidgetsDeclaration):
age = TextField()
name = TextField()
as a second choice.
-Matt
Michele Cella wrote:
> [Last email I promise]
>
> Finally should we go with this style:
>
> class ContactFields(WidgetsDeclaration):
> age = TextField()
> name = TextField()
>
> or as from Jeff suggestion:
>
> class ContactFields(WidgetsDeclaration):
> TextField(name="age")
> TextField(name="name")
>
> plus for the latter is that it removes all the magic (regarding the
> name parameter), and I agree with Jeff that it feels right.
> But how does it feel from a python point? It's legal code inside a
> class? :-)