#NEWLINE# def __repr__( self ) : #NEWLINE# #INDENT# if ( id ( self ) in _repr_stack ) : #NEWLINE# #INDENT# return object . __repr__ ( self ) #NEWLINE# #UNINDENT# _repr_stack . add ( id ( self ) ) #NEWLINE# try : #NEWLINE# #INDENT# return ( '%s(%s)' % ( key . __class__ . __name__ , ', ' . join ( [ ( '%s=%r' % ( key , getattr ( self , key ) ) ) for key in sorted ( self . __dict__ . keys ( ) ) if ( not key . startswith ( '_' ) ) ] ) ) ) #NEWLINE# #UNINDENT# finally : #NEWLINE# #INDENT# _repr_stack . remove ( id ( self ) )