Mercurial > genshi > mirror
diff markup/template.py @ 48:a5d585dd38c4 trunk
convert the result of expressions in attributes to strings so that values like ints are output correctly
author | mgood |
---|---|
date | Tue, 04 Jul 2006 04:49:22 +0000 |
parents | 436e30c8420b |
children | d3842cd76e92 |
line wrap: on
line diff
--- a/markup/template.py +++ b/markup/template.py @@ -33,7 +33,6 @@ * Improved error reporting * Support for using directives as elements and not just as attributes, reducing the need for wrapper elements with py:strip="" - * Support for py:choose/py:when/py:otherwise (similar to XSLT) * Support for list comprehensions and generator expressions in expressions Random thoughts: @@ -804,7 +803,7 @@ values.append(subdata.evaluate(ctxt)) else: values.append(subdata) - value = filter(lambda x: x is not None, values) + value = [unicode(x) for x in values if x is not None] if not value: continue new_attrib.append((name, u''.join(value)))