Message207693
Expected: pprint the object
Observed: crash with:
set([Traceback (most recent call last):
File "./test.py", line 7, in <module>
pp.pprint(myset)
File "/usr/lib/python2.7/pprint.py", line 117, in pprint
self._format(object, self._stream, 0, 0, {}, 0)
File "/usr/lib/python2.7/pprint.py", line 194, in _format
object = _sorted(object)
File "/usr/lib/python2.7/pprint.py", line 82, in _sorted
return sorted(iterable)
TypeError: can only compare to a set
Steps to repro:
#!/usr/bin/python
import pprint
pp = pprint.PrettyPrinter(indent=4)
myset = set(xrange(3))
myset.add(frozenset(xrange(10)))
pp.pprint(myset) |
|
Date |
User |
Action |
Args |
2014-01-08 17:37:12 | jbylund | set | recipients:
+ jbylund |
2014-01-08 17:37:11 | jbylund | set | messageid: <1389202631.98.0.662803177988.issue20192@psf.upfronthosting.co.za> |
2014-01-08 17:37:11 | jbylund | link | issue20192 messages |
2014-01-08 17:37:11 | jbylund | create | |
|