def __init__(self, schema, nbits=32, initial=0):
    '\n        :param schema:\n            A list of FlagField objects representing the values to be packed\n            into this object, in order from LSB to MSB of the underlying int\n\n        :param nbits:\n            An integer representing the total number of bits used for flags\n\n        :param initial:\n            The initial integer value of the flags field\n        '
    self._nbits = nbits
    self._value = initial
    self._schema = OrderedDict()
    tot_bits = sum([item.nbits for item in schema])
    if (tot_bits > nbits):
        raise TypeError('Too many fields for {nbits}-bit field (schema defines {tot} bits)'.format(nbits=nbits, tot=tot_bits))
    bitn = 0
    for item in schema:
        if (not isinstance(item, FlagField)):
            raise TypeError('Schema must be composed of FlagField objects')
        if (not issubclass(item.ftype, FlagBase)):
            raise TypeError('Expected FlagBase, got {}'.format(item.ftype))
        self._schema[item.name] = item.ftype(self, bitn, item.nbits, item.extra)
        bitn += item.nbits
:param schema:
    A list of FlagField objects representing the values to be packed
    into this object, in order from LSB to MSB of the underlying int

:param nbits:
    An integer representing the total number of bits used for flags

:param initial:
    The initial integer value of the flags field
def __init__(self, schema, nbits=32, initial=0):
    '\n        :param schema:\n            A list of FlagField objects representing the values to be packed\n            into this object, in order from LSB to MSB of the underlying int\n\n        :param nbits:\n            An integer representing the total number of bits used for flags\n\n        :param initial:\n            The initial integer value of the flags field\n        '
    self._nbits = nbits
    self._value = initial
    self._schema = OrderedDict()
    tot_bits = sum([item.nbits for item in schema])
    if (tot_bits > nbits):
        raise TypeError('Too many fields for {nbits}-bit field (schema defines {tot} bits)'.format(nbits=nbits, tot=tot_bits))
    bitn = 0
    for item in schema:
        if (not isinstance(item, FlagField)):
            raise TypeError('Schema must be composed of FlagField objects')
        if (not issubclass(item.ftype, FlagBase)):
            raise TypeError('Expected FlagBase, got {}'.format(item.ftype))
        self._schema[item.name] = item.ftype(self, bitn, item.nbits, item.extra)
        bitn += item.nbits