Mercurial > genshi > mirror
diff genshi/template/core.py @ 345:2aa7ca37ae6a trunk
Make `Attrs` instances immutable.
author | cmlenz |
---|---|
date | Fri, 10 Nov 2006 15:27:36 +0000 |
parents | 7763f7aec949 |
children | 0cc031745884 |
line wrap: on
line diff
--- a/genshi/template/core.py +++ b/genshi/template/core.py @@ -326,9 +326,9 @@ if kind is START and data[1]: # Attributes may still contain expressions in start tags at # this point, so do some evaluation - tag, attrib = data - new_attrib = [] - for name, substream in attrib: + tag, attrs = data + new_attrs = [] + for name, substream in attrs: if isinstance(substream, basestring): value = substream else: @@ -340,8 +340,8 @@ value = [x for x in values if x is not None] if not value: continue - new_attrib.append((name, u''.join(value))) - yield kind, (tag, Attrs(new_attrib)), pos + new_attrs.append((name, u''.join(value))) + yield kind, (tag, Attrs(new_attrs)), pos elif kind is EXPR: result = data.evaluate(ctxt)