Oliver Sturm writes:
On 25.09.2001 22:41:31 +0200 Dieter Maurer <dieter@handshake.de> wrote:
- How exactly is the expression "foo" defined? The expression "foo" is defined as "foo"....
I was thinking of "foo" as a Zope expression like in <dtml-if foo>. Like I wrote in the other thread, there must be some internal method that Zope uses to do that existence and value check. Why can't I use that from the Python expression? (Yes, I know that now, I can do the same thing, only I thought it was a little more intuitive.)
Again, you stopped reading too early! The section following the one quoted above explained how "foo" is interpreted in a boolean context (such as the "dtml-if"). It is the same way as in Python with the exception that "dtml-if" considers a missing name as false while Python considers a missing name as an exception... Please read my replies carefully! It takes time to prepare them and it is unfriendly to ignore essential parts of them and therefore follow-up with an additional question. I may use the kill-file facility of my newsreader to protect myself.... Dieter