On 27 Aug 2005, at 20:15, John Schinnerer wrote:
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.

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.


Zope maillist  -  Zope@zope.org
**   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