Python源码示例:pyasn1.type.constraint.ValueRangeConstraint()

示例1
def _vno_component(tag_value, name="pvno"):
    return _sequence_component(
        name, tag_value, univ.Integer(),
        subtypeSpec=constraint.ValueRangeConstraint(5, 5)) 
示例2
def _vno_component(tag_value, name="pvno"):
    return _sequence_component(
        name, tag_value, univ.Integer(),
        subtypeSpec=constraint.ValueRangeConstraint(5, 5)) 
示例3
def withRange(cls, minimum, maximum):
        """Creates a subclass with value range constraint.
        """
        class X(cls):
            subtypeSpec = cls.subtypeSpec + constraint.ValueRangeConstraint(minimum, maximum)
        X.__name__ = cls.__name__
        return X 
示例4
def _vno_component(tag_value, name="pvno"):
    return _sequence_component(
        name, tag_value, univ.Integer(),
        subtypeSpec=constraint.ValueRangeConstraint(5, 5)) 
示例5
def _vno_component(tag_value, name="pvno"):
    return _sequence_component(
        name, tag_value, univ.Integer(),
        subtypeSpec=constraint.ValueRangeConstraint(5, 5))