Set flags from value in P.
353661
function setFlags() {
		flagN = !!( P & 0x80 );
		flagV = !!( P & 0x40 );
		flagB = !!( P & 0x10 );
		flagD = !!( P & 0x08 );
		flagI = !!( P & 0x04 );
		flagZ = !!( P & 0x02 );
		flagC = !!( P & 0x01 );
	}
680838
def _match_value_filter(self, p, value):
        
        return self._VALUE_FILTER_MAP[p[0]](value[p[1]], p[2])
1104127
def flags(self, index):
        """"""
        if not index.isValid():
            return Qt.ItemIsEnabled
        column = index.column()
        if column in [0, 1, 2, 3]:
            return Qt.ItemFlags(Qt.ItemIsEnabled)
        else:
            return Qt.ItemFlags(Qt.NoItemFlags)
742050
def __with_argument(node, value):
    """"""
    arguments = node.getElementsByTagName('Argument')

    if arguments:
        logging.debug('Found argument within %s', value['name'])
        value['flags'] = vsflags(VSFlags.UserValueIgnored, VSFlags.Continue)
505312
def InitPmf(self, values):
        
        for value, prob in values.Items():
            self.Set(value, prob)
1020298
def _pfp__set_value(self, value):
        
        if self._pfp__frozen:
            raise errors.UnmodifiableConst()
        if len(value) != len(self._pfp__children):
            raise errors.PfpError("struct initialization has wrong number of members")

        for x in six.moves.range(len(self._pfp__children)):
            self._pfp__children[x]._pfp__set_value(value[x])
1365456
def override_if_not_in_args(flag, argument, args):
  """"""
  if flag not in args:
    args.extend([flag, argument])
290267
def P1(self, value):
        """"""
        if value < self.P2:
            self._P1 = value
        else:
            raise InvalidFirstDisparityChangePenaltyError("P1 must be less "
                                                          "than P2.")
        self._replace_bm()
839838
def setValue(self, value):
        """"""
        if self.name in self._CUSTOM_INT_PARAMS:
            value = int(value)
        elif self.name in self._CUSTOM_FLOAT_PARAMS:
            value = float(value)
        elif self.name in self._CUSTOM_BOOL_PARAMS:
            value = bool(value)
        elif self.name in self._CUSTOM_INTLIST_PARAMS:
            value = readIntlist(value)
        elif self.name in self._CUSTOM_DICT_PARAMS:
            parser = Parser()
            value = parser.parse(value)
        elif self.name == "note":
            value = unicode(value)
        self._value = value
1260048
def flag_to_list(flagval, flagtype):
    """"""
    if flagtype == 'int':
        return [int(_) for _ in flagval.split(',') if _]

    elif flagtype == 'float':
        return [float(_) for _ in flagval.split(',') if _]

    elif flagtype == 'str':
        return [_ for _ in flagval.split(',') if _]

    else:
        raise Exception("incorrect type")
106309
def set(self, value):
        """"""
        if self.validate(value):
            #print "Parameter " + self.id + " successfully set to " + repr(value)
            self.hasvalue = True
            if isinstance(value, float):
                self.value = round(value)
            else:
                self.value = int(value)
            return True
        else:
            #print "Parameter " + self.id + " COULD NOT BE set to " + repr(value)
            return False
259944
def P2(self, value):
        """"""
        if value > self.P1:
            self._P2 = value
        else:
            raise InvalidSecondDisparityChangePenaltyError("P2 must be greater "
                                                          "than P1.")
        self._replace_bm()
1167771
def toSet(self, flags):
        
        return {key for key, value in self.items() if value & flags}
338543
def flags=(values)
      val = 0
      FRAME_FLAGS_MAP.values_at(*values).each { |c|
        val |= c if c
      }
      @flags_value = val
    end
474343
def set(self, value = True):
        """"""
        value = value in (True,1) or ( (isinstance(value, str) or (sys.version < '3' and isinstance(value, unicode))) and (value.lower() in ("1","yes","true","enabled"))) #pylint: disable=undefined-variable
        return super(BooleanParameter,self).set(value)
733643
def set(self, value):
        """"""
        if self.validate(value):
            #print "Parameter " + self.id + " successfully set to " + repr(value)
            self.hasvalue = True
            self.value = value
            return True
        else:
            #print "Parameter " + self.id + " COULD NOT BE set to " + repr(value)
            return False
1044226
def load_flag_values(self, flags=None):
    
    if flags is None:
      flags = self._flags
    for keyval in flags.config_value:
      k, v = keyval.split('=', 1)
      v = self._modules['yaml'].load(v) if isinstance(v, str) else v

      # Force any command line keys and values that are bytes to unicode.
      k = k.decode() if isinstance(k, bytes) else k
      v = v.decode() if isinstance(v, bytes) else v

      self._flag_values.setdefault(k, v)