On 4/12/07, Giovannetti, Mark <[EMAIL PROTECTED]> wrote:

Hi list,

Hope everyone's having a splendid day/evening/whatever.

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

    if context:

the other has:

    if context is not None

The first fails to be true even if context is not None.
This can be seen by the output from the logs showing the
context variable as:


Possibly a context is a container-like object.
For containers operation
"if context" is equal to "if len(context) > 0".  So even if context is not
None, it still may be False if the container does not contain any elements.
_______________________________________________
Zope3-users mailing list
[EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope3-users

Reply via email to