mirror of https://github.com/mahmoud/boltons.git
tableutils.Table: make dictionary tables a little more consistent
This commit is contained in:
parent
613cadd575
commit
ae2a90151f
|
@ -101,7 +101,7 @@ class DictInputType(InputType):
|
|||
return isinstance(obj, Mapping)
|
||||
|
||||
def guess_headers(self, obj):
|
||||
return obj.keys()
|
||||
return sorted(obj.keys())
|
||||
|
||||
def get_entry(self, obj, headers):
|
||||
return [obj.get(h) for h in headers]
|
||||
|
|
Loading…
Reference in New Issue