def withNamedBits(cls, **values):
        """Creates a subclass with discreet named bits constraint.

        Reduce fully duplicate enumerations along the way.
        """
        enums = set(cls.namedValues.items())
        enums.update(values.items())

        class X(cls):
            namedValues = namedval.NamedValues(*enums)

        X.__name__ = cls.__name__
        return X
Creates a subclass with discreet named bits constraint.

        Reduce fully duplicate enumerations along the way.