#NEWLINE# def __format__( self , fmt ) : #NEWLINE# #INDENT# value = self . get_value ( ) #NEWLINE# pt = fmt [ ( - 1 ) : ] #NEWLINE# type_conv = _TYPE_MAP . get ( fmt , str ) #NEWLINE# try : #NEWLINE# #INDENT# return value . __format__ ( fmt ) #NEWLINE# #UNINDENT# except ( ValueError , TypeError ) : #NEWLINE# #INDENT# return type_conv ( value ) . __format__ ( fmt )