[Zope3-Users] Using 'if object' evaluates false even if object exists

Benji York benji at zope.com
Thu Apr 12 16:21:25 EDT 2007


Giovannetti, Mark wrote:
> Hope everyone's having a splendid day/evening/whatever.

My whatever is going quite well, thanks!

> I've encountered a strange error.  I have two chunks
> of nearly identical code below.  The only difference
> is the first "if" statement.

This is related to how Python evaluates boolean expressions.  See 
http://docs.python.org/lib/truth.html for more info.
-- 
Benji York
Senior Software Engineer
Zope Corporation


More information about the Zope3-users mailing list