#NEWLINE# def repr_instance( self , x , level ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# s = builtins . repr ( x ) #NEWLINE# #UNINDENT# except Exception : #NEWLINE# #INDENT# return ( '<%s instance at %x>' % ( x . __class__ . __name__ , id ( x ) ) ) #NEWLINE# #UNINDENT# if ( len ( s ) > self . maxother ) : #NEWLINE# #INDENT# i = max ( 0 , ( ( self . maxother - 3 ) // 2 ) ) #NEWLINE# j = max ( 0 , ( ( self . maxother - 3 ) - i ) ) #NEWLINE# s = ( ( s [ : i ] + '...' ) + s [ ( len ( s ) - j ) : ] ) #NEWLINE# #UNINDENT# return s