Message96014
We need a more generic solution that allows multi-line reprs for a
variety of types. Here is an example that doesn't involve named tuples:
>>> pprint(s, width=15)
[OrderedDict([('x', 30000000000), ('y', 4000000000), ('z', 5000000000)]),
OrderedDict([('x', 6000000000), ('y', 70000000), ('z', 8000000000)])]
What we want is to have it print like regular dictionaries do:
>>> pprint([dict(p) for p in s], width=15)
[{'x': 30000000000,
'y': 4000000000,
'z': 5000000000},
{'x': 6000000000,
'y': 70000000,
'z': 8000000000}]
It would also be nice if pprint could accept arguments telling it how to
format various types:
>>> pprint(s, width=15, format={int: '15,'})
[{'x': ' 30,000,000,000',
'y': ' 4,000,000,000',
'z': ' 5,000,000,000'},
{'x': ' 6,000,000,000',
'y': ' 70,000,000',
'z': ' 8,000,000,000'}] |
|
Date |
User |
Action |
Args |
2009-12-06 01:15:46 | rhettinger | set | recipients:
+ rhettinger, pitrou, afoglia |
2009-12-06 01:15:45 | rhettinger | set | messageid: <1260062145.24.0.341181789585.issue7434@psf.upfronthosting.co.za> |
2009-12-06 01:15:43 | rhettinger | link | issue7434 messages |
2009-12-06 01:15:43 | rhettinger | create | |
|