[Zope] Test whether ZClass lines type property is empty

Milos Prudek milos.prudek@tiscali.cz
Thu, 04 Oct 2001 18:45:16 +0200


ZClass "lines" type property is a "list" in Python.

If there are no values, it should render IMHO as an empty list in
Python: []

But it renders as a list containing single item. Something like: [""]

Consequently, len(variable) is 1, whether there is one line or no lines.

I cannot use <dtml-if "_.len(variable)>0"> to see if there are values.

How can I discover if the list is empty without computationally
expensive constructs?

--
Milos Prudek