[Zope] Boolean properties ( Zope 2.5)

Chris Beaven Chris@d-designz.co.nz
Thu, 5 Sep 2002 10:29:54 +1200


In Python, 'and' and 'or' perform boolean logic as you would expect, but
they do not return boolean values; they return one of the actual values they
are comparing. 

>>> 'a' and 'b'
'b'
>>> '' and 'b'
''

>>> 'a' or 'b'
'a'
>>> '' or 'b'
'b'

http://diveintopython.org/apihelper_andor.html

Well, I found it interesting...


-----Original Message-----
From: Brian Sullivan [mailto:brians@meetingbywire.com]
Sent: Thursday, 5 September 2002 2:27 a.m.
To: zope@zope.org
Subject: [Zope] Boolean properties ( Zope 2.5)


I a trying to figure out what values are stored in Boolean typed
properties of a Zope object in order to display information in and
retrieve and set information from form checkboxes.

What values are actually set/returned in boolean properties?


_______________________________________________
Zope maillist  -  Zope@zope.org
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )