#NEWLINE# def __init__( self , * cases , **extra ) : #NEWLINE# #INDENT# if ( not all ( ( isinstance ( case , When ) for case in cases ) ) ) : #NEWLINE# #INDENT# raise TypeError ( 'Positional arguments must all be When objects.' ) #NEWLINE# #UNINDENT# default = extra . pop ( 'default' , None ) #NEWLINE# output_field = extra . pop ( 'output_field' , None ) #NEWLINE# super ( Case , self ) . __init__ ( output_field ) #NEWLINE# self . cases = list ( cases ) #NEWLINE# self . default = self . _parse_expressions ( default ) [ 0 ] #NEWLINE# self . extra = extra