#NEWLINE# def __str__( self , ignore_args = False ) : #NEWLINE# #INDENT# if ignore_args : #NEWLINE# #INDENT# args = '[...]' #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# args = self . _args #NEWLINE# try : #NEWLINE# #INDENT# args = '<<{0}>>' . format ( str ( self . unpack ( self . _args ) ) ) #NEWLINE# #UNINDENT# except Exception : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# #UNINDENT# if self . _identity : #NEWLINE# #INDENT# identity = ', ' . join ( ( repr ( x . bytes ) for x in self . _identity ) ) #NEWLINE# return '<{0}> {1} {2} {3}' . format ( identity , self . _name , self . _header , args ) #NEWLINE# #UNINDENT# return '{0} {1} {2}' . format ( self . _name , self . _header , args )