9 May
2006
9 May
'06
3:23 p.m.
On 5/9/06, Jonathan <dev101@magma.ca> wrote:
I think I am misunderstanding something basic about python/zope here. Why does a TOC object evaluate to false?
Well, why not? If you are checking for none-ness, use "is None". Evaluating the object is wrong. If the TOC object evaluates to something empty as a side-effect of something, or because it explicitly is supposed to return something useful when evaluated, who in this case happens to be empty/false, is besides the point. It should be easy to figure out if you read the source, though. :-) -- Lennart Regebro, Nuxeo http://www.nuxeo.com/ CPS Content Management http://www.cps-project.org/