Issue 9826: OrderedDict ref cycles break repr() (original) (raw)
repr of circular graphs of collections.OrderedDicts fails with 'RuntimeError: maximum recursion depth exceeded while calling a Python object'.
from collections import OrderedDict left, right = OrderedDict(), OrderedDict() left['other'] = right right['other'] = left left Traceback (most recent call last): File "", line 1, in ... File "lib/python2.7/collections.py", line 137, in repr return '%s(%r)' % (self.class.name, self.items()) RuntimeError: maximum recursion depth exceeded in subclasscheck