On Wed, 1 Feb 2006 14:57:58 -0500, "Paul Winkler" <[EMAIL PROTECTED]>
> Prior to python 2.5, there is AFAIK no other always-works
> short-circuiting one-line conditional expression but this:
> (bool(C) and [foo] or [bar])
Agreed that that works every time, but so does:
Each to his own idioms, I suppose.
> Generally I only care about this in TALES expressions;
> in python I prefer to use the extra couple of lines to
> use "if" and "else".
Same here, but I would be +1 on a python:test method readily available
in page templates
Zope3-users mailing list