Mercurial > genshi > genshi-test
diff markup/core.py @ 161:a25f9fc5787d
Various docstring additions and other cosmetic changes.
author | cmlenz |
---|---|
date | Wed, 16 Aug 2006 22:32:31 +0000 |
parents | f7fb556f2678 |
children | f1ac0510d392 |
line wrap: on
line diff
--- a/markup/core.py +++ b/markup/core.py @@ -216,7 +216,7 @@ return default def remove(self, name): - """Removes the attribute with the specified name. + """Remove the attribute with the specified name. If no such attribute is found, this method does nothing. """ @@ -226,7 +226,7 @@ break def set(self, name, value): - """Sets the specified attribute to the given value. + """Set the specified attribute to the given value. If an attribute with the specified name is already in the list, the value of the existing entry is updated. Otherwise, a new attribute is @@ -240,6 +240,11 @@ self.append((QName(name), value)) def totuple(self): + """Return the attributes as a markup event. + + The returned event is a TEXT event, the data is the value of all + attributes joined together. + """ return TEXT, u''.join([x[1] for x in self]), (None, -1, -1)