def validate_unicode_decode_error_handler(dummy, value):
 if (value not in _UNICODE_DECODE_ERROR_HANDLERS):
  raise ValueError(('%s is an invalid Unicode decode error handler. Must be one of %s' % (value, tuple(_UNICODE_DECODE_ERROR_HANDLERS))))
 return value

def validate_unicode_decode_error_handler ( dummy , value ) : if ( value not in _UNICODE_DECODE_ERROR_HANDLERS ) : raise ValueError ( ( '%s is an invalid Unicode decode error handler. Must be one of %s' % ( value , tuple ( _UNICODE_DECODE_ERROR_HANDLERS ) ) ) ) return value
validate the unicode decode error handler option of codecoptions .