Aloha,

> > python:here.sponsors[0] != ''
> >
> > if the tuple is empty, whereas 2.5.1/2.1.3 must have been returning
> > some equivalent of boolean 'false' when the tuple was empty.
> 
> No. Python 2.1.3 would have blown up the same way.

Must have been Zope 2.5.1 somehow turning the python blowup into
equivalent of boolean 'false' then, or my clearly less than exemplary
code would have also failed under 2.5.1, as it does under 2.7.5.

> > Now I do this
> >
> > python: (here.sponsors) and (here.sponsors[0] != '')
> >
> > and it works again.
> > The second condition may be redundant now I suppose...?
> 
> No it is not redundant. A value ('',) would still be True as far as  
> Python is concerned and would pass the first condition.

Right, thanks!

John S.


                
____________________________________________________
Start your day with Yahoo! - make it your home page 
http://www.yahoo.com/r/hs 
 
_______________________________________________
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to