[Zope] A quick zope/python question

Lennart Regebro regebro at gmail.com
Tue May 9 11:23:45 EDT 2006


On 5/9/06, Jonathan <dev101 at 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/


More information about the Zope mailing list