#NEWLINE# def __format__( self , format_spec ) : #NEWLINE# #INDENT# if ( format_spec and ( format_spec not in self . format_types ) ) : #NEWLINE# #INDENT# raise ValueError ( ( "Unknown format_spec '%s'" % format_spec ) ) #NEWLINE# #UNINDENT# if ( ( not format_spec ) and self . format_types ) : #NEWLINE# #INDENT# format_spec = self . format_types [ 0 ] #NEWLINE# #UNINDENT# return self . pattern . format ( position = self . position , format_type = format_spec )