#NEWLINE# def __init__( self , level , single , label , regex ) : #NEWLINE# #INDENT# ( self . level , self . single , self . label ) = ( level , single , label ) #NEWLINE# self . regex = re . compile ( ( ( '^(%s)$' % single ) if single else ( '^(%s)..(%s)$' % ( regex , regex ) ) ) ) #NEWLINE# DateRangeType . all [ ( level , single ) ] = self