def recursiveRepr(self, stuff, thunk=repr):
ID = id(stuff)<EOL>if ID in self.active:<EOL><INDENT>return '<STR_LIT>' % (stuff.__class__.__name__,)<EOL><DEDENT>else:<EOL><INDENT>try:<EOL><INDENT>self.active[ID] = stuff<EOL>return thunk(stuff)<EOL><DEDENT>finally:<EOL><INDENT>del self.active[ID]<EOL><DEDENT><DEDENT>
Recursive repr().