#NEWLINE# def __init__( self , * args , **kwargs ) : #NEWLINE# #INDENT# self . is_valid = kwargs . pop ( 'is_valid' , True ) #NEWLINE# if ( len ( args ) == 1 ) : #NEWLINE# #INDENT# if isinstance ( args [ 0 ] , interval ) : #NEWLINE# #INDENT# ( self . start , self . end ) = ( args [ 0 ] . start , args [ 0 ] . end ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . start = float ( args [ 0 ] ) #NEWLINE# self . end = float ( args [ 0 ] ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if ( len ( args ) == 2 ) : #NEWLINE# #INDENT# if ( args [ 0 ] < args [ 1 ] ) : #NEWLINE# #INDENT# self . start = float ( args [ 0 ] ) #NEWLINE# self . end = float ( args [ 1 ] ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . start = float ( self [ 1 ] ) #NEWLINE# self . end = float ( args [ 0 ] ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# raise ValueError ( 'interval takes a maximum of two float values as arguments' )