[Zope] Using ZPT with options/radio/checkboxes

Paul Winkler pw_lists at slinkp.com
Thu Aug 7 16:27:15 EDT 2003


On Thu, Aug 07, 2003 at 03:09:57PM -0400, Ron Bickers wrote:
> I don't know if any graphical editors will have a problem with multiple
> inputs having the checked/selected attribute or not, so I chose the string
> 'selected' instead of default.

hmm, that's a good point, i don't know either.
I'd be worried of something "fixing" it for me.

> Did I miss anything?  Is there an advantage or disadvantage of using
> "and...or" instead of test()?

only that it short-circuits.
In the expression "foo and bar or baz":

* bar is only evaluated if foo is true.
* baz is only evaluated if either foo or bar is false.

test() evaluates everything before it is even called.

However, in the grand scheme of things, this is probably not significant
to your website performance :-)

-- 

Paul Winkler
http://www.slinkp.com
Look! Up in the sky! It's THE PUERILE DEMON!
(random hero from isometric.spaceninja.com)



More information about the Zope mailing list