def augment_options(options, subset):
 fields = [attr for attr in dir(options) if ((not callable(getattr(options, attr))) and (not attr.startswith('__')))]
 for field in fields:
  value = subset.get(field)
  if (value != None):
   setattr(options, field, value)
 return options

def augment_options ( options , subset ) : fields = [ attr for attr in dir ( options ) if ( ( not callable ( getattr ( options , attr ) ) ) and ( not attr . startswith ( '__' ) ) ) ] for field in fields : value = subset . get ( field ) if ( value != None ) : setattr ( options , field , value ) return options
augment @options with defined values in @subset options -- a class with public attributes .