211 data = pycompat.byteskwargs(data) |
211 data = pycompat.byteskwargs(data) |
212 self._item.update(data) |
212 self._item.update(data) |
213 def write(self, fields, deftext, *fielddata, **opts): |
213 def write(self, fields, deftext, *fielddata, **opts): |
214 '''do default text output while assigning data to item''' |
214 '''do default text output while assigning data to item''' |
215 fieldkeys = fields.split() |
215 fieldkeys = fields.split() |
216 assert len(fieldkeys) == len(fielddata) |
216 assert len(fieldkeys) == len(fielddata), (fieldkeys, fielddata) |
217 self._item.update(zip(fieldkeys, fielddata)) |
217 self._item.update(zip(fieldkeys, fielddata)) |
218 def condwrite(self, cond, fields, deftext, *fielddata, **opts): |
218 def condwrite(self, cond, fields, deftext, *fielddata, **opts): |
219 '''do conditional write (primarily for plain formatter)''' |
219 '''do conditional write (primarily for plain formatter)''' |
220 fieldkeys = fields.split() |
220 fieldkeys = fields.split() |
221 assert len(fieldkeys) == len(fielddata) |
221 assert len(fieldkeys) == len(fielddata) |