Is there any clean way to supress the unicode character prefix when printing an object using the pprint module?
>>> import pprint
>>> pprint.pprint({u'foo': u'bar', u'baz': [u'apple', u'orange', u'pear', u'guava', u'banana'], u'hello': u'world'})
{u'baz': [u'apple', u'orange', u'pear', u'guava', u'banana'],
u'foo': u'bar',
u'hello': u'world'}
This looks pretty ugly. Is there any way to print the __str__ value of each object, instead of the __repr__?
__str__
of each object, you won't get the quotes either. Is that really what you want? – Solander