#NEWLINE# def default( obj , value = None , factory = None ) : #NEWLINE# #INDENT# if ( ( ( value is None ) and ( value is None ) ) or ( ( value is not None ) and ( factory is not None ) ) ) : #NEWLINE# #INDENT# raise ValueError ( 'value or factory must be given' ) #NEWLINE# #UNINDENT# if ( obj is None ) : #NEWLINE# #INDENT# if ( value is None ) : #NEWLINE# #INDENT# return factory ( ) #NEWLINE# #UNINDENT# return value #NEWLINE# #UNINDENT# return obj