[ZPT] why is default false?

Florent Guillaume fg@nuxeo.com
Fri, 24 May 2002 14:33:14 +0000 (UTC)


Not insane, but do you have a real use case ? Otherwise I'd say YAGNI.
In my experience having default be always true would have been enough.

Florent

Casey Duncan  <casey@zope.com> wrote:
> Would it be insane for default to act just like the sample content string 
> would?
> 
> IOW, default would be false if the sample tag content was empty, and true 
> otherwise.
> 
> -Casey
> 
> On Friday 24 May 2002 10:10 am, Florent Guillaume wrote:
> > Agreed, I too am for that change if it doesn't break anything.
> > And for exactly the reason you mention :-)
> > 
> > Florent
> > 
> > Fred L. Drake, Jr. <fdrake@acm.org> wrote:
> > > 
> > > Does anyone remember why default is a false value?  It should be
> > > possible to conditionally set an attribute using something like:
> > > 
> > > <td tal:repeat="ob python:mysequence">
> > >   <span class="something"
> > >         tal:attributes="class python: expr and default or nothing">
> > >     ...
> > >   </span>
> > > </td>
> > > 
> > > I'm sure there was a specific reason for it to be false, but I sure
> > > don't remember what, and can't find it in the old project Wiki.
-- 
Florent Guillaume, Nuxeo (Paris, France)
+33 1 40 33 79 87  http://nuxeo.com  mailto:fg@nuxeo.com