formatter: use dict.update() to set arguments passed to write functions
This isn't important, but update() is better than loop in general.
--- a/mercurial/formatter.py Wed Sep 23 21:51:48 2015 +0900
+++ b/mercurial/formatter.py Wed Sep 23 21:54:47 2015 +0900
@@ -50,14 +50,12 @@
'''do default text output while assigning data to item'''
fieldkeys = fields.split()
assert len(fieldkeys) == len(fielddata)
- for k, v in zip(fieldkeys, fielddata):
- self._item[k] = v
+ self._item.update(zip(fieldkeys, fielddata))
def condwrite(self, cond, fields, deftext, *fielddata, **opts):
'''do conditional write (primarily for plain formatter)'''
fieldkeys = fields.split()
assert len(fieldkeys) == len(fielddata)
- for k, v in zip(fieldkeys, fielddata):
- self._item[k] = v
+ self._item.update(zip(fieldkeys, fielddata))
def plain(self, text, **opts):
'''show raw text for non-templated mode'''
pass