ability to format dicts
This commit is contained in:
parent
4fe8f13984
commit
f7214e5e62
5 changed files with 51 additions and 30 deletions
|
|
@ -34,9 +34,7 @@ class MultilineFormatter(IFormatter):
|
|||
def flush(self):
|
||||
pass
|
||||
|
||||
def format_obj(self, obj, alias):
|
||||
item = self.to_dict(obj)
|
||||
|
||||
def format_dict(self, item):
|
||||
result = u'\n'.join(u'%s%s' % (
|
||||
(u'%s%s' % (k, self.key_value_separator) if self.display_keys else ''), v)
|
||||
for k, v in item.iteritems() if (v is not NotLoaded and v is not NotAvailable))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue