While I was trying out a prettier prettyprint, it could be piped in with a Python object in literal like:


$ echo "{'hello': 'world'}" | pypprint

It prompoted me to test the original pprint module:


$ python2.7 -m pprint
_safe_repr: 6.99084496498
pformat: 35.5936410427
$ python3.3 -m pprint
_safe_repr: 8.930527448654175
pformat: 18.46874499320984

Honestly, I don’t really know if there truly is a pracitcal usage for that, but now I know there is a performance test in pprint.py, although the results might not be useful, either, or even mean anything.

Just like import antigravity or import this, it’s good to know. Only in this case, this is no fun element in it, and I don’t actually think knowing pformat that is nearly twice faster in Python 3 than in Python 2, would be helpful in anything.