本文整理汇总了Python中pyasn1.type.constraint.ConstraintsIntersection方法的典型用法代码示例。如果您正苦于以下问题:Python constraint.ConstraintsIntersection方法的具体用法?Python constraint.ConstraintsIntersection怎么用?Python constraint.ConstraintsIntersection使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pyasn1.type.constraint
的用法示例。
在下文中一共展示了constraint.ConstraintsIntersection方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: clone
# 需要导入模块: from pyasn1.type import constraint [as 别名]
# 或者: from pyasn1.type.constraint import ConstraintsIntersection [as 别名]
def clone(self, value=noValue, **kwargs):
"""Create a copy of a |ASN.1| type or object.
Any parameters to the *clone()* method will replace corresponding
properties of the |ASN.1| object.
Parameters
----------
value: :class:`tuple`, :class:`float` or |ASN.1| object
Initialization value to pass to new ASN.1 object instead of
inheriting one from the caller.
tagSet: :py:class:`~pyasn1.type.tag.TagSet`
Object representing ASN.1 tag(s) to use in new object instead of inheriting from the caller
subtypeSpec: :py:class:`~pyasn1.type.constraint.ConstraintsIntersection`
Object representing ASN.1 subtype constraint(s) to use in new object instead of inheriting from the caller
Returns
-------
:
new instance of |ASN.1| type/value
"""
return base.AbstractSimpleAsn1Item.clone(self, value, **kwargs)
示例2: clone
# 需要导入模块: from pyasn1.type import constraint [as 别名]
# 或者: from pyasn1.type.constraint import ConstraintsIntersection [as 别名]
def clone(self, value=noValue, tagSet=None, subtypeSpec=None,
namedValues=None):
"""Creates a copy of object representing ASN.1 INTEGER type or value.
If additional parameters are specified, they will be used
in resulting object instead of corresponding parameters of
current object.
Parameters
----------
value : :class:`int`, :class:`str` or :py:class:`~pyasn1.type.univ.Integer` object
Initialization value to pass to new ASN.1 object instead of
inheriting one from the caller.
tagSet: :py:class:`~pyasn1.type.tag.TagSet`
Object representing ASN.1 tag(s) to use in new object instead of inheriting from the caller
subtypeSpec: :py:class:`~pyasn1.type.constraint.ConstraintsIntersection`
Object representing ASN.1 subtype constraint(s) to use in new object instead of inheriting from the caller
namedValues: :py:class:`~pyasn1.type.namedval.NamedValues`
Object representing symbolic aliases for numbers to use instead of inheriting from caller
Returns
-------
: :py:class:`~pyasn1.type.univ.Integer`
new instance of INTEGER type/value
"""
if self.isNoValue(value):
if self.isNoValue(tagSet, subtypeSpec, namedValues):
return self
value = self._value
if tagSet is None:
tagSet = self._tagSet
if subtypeSpec is None:
subtypeSpec = self._subtypeSpec
if namedValues is None:
namedValues = self.__namedValues
return self.__class__(value, tagSet, subtypeSpec, namedValues)
示例3: subtype
# 需要导入模块: from pyasn1.type import constraint [as 别名]
# 或者: from pyasn1.type.constraint import ConstraintsIntersection [as 别名]
def subtype(self, value=noValue, implicitTag=None, explicitTag=None,
subtypeSpec=None):
"""Creates a copy of BOOLEAN object representing ASN.1 subtype or a value.
If additional parameters are specified, they will be merged
with the ones of the caller, then applied to newly created object.
Parameters
----------
value : :class:`int` or :py:class:`~pyasn1.type.univ.Boolean` object
Initialization value to pass to new ASN.1 object instead of
inheriting one from the caller.
implicitTag: :py:class:`~pyasn1.type.tag.Tag`
Implicitly apply given ASN.1 tag object to caller's
:py:class:`~pyasn1.type.tag.TagSet`, then use the result as
new object's ASN.1 tag(s).
explicitTag: :py:class:`~pyasn1.type.tag.Tag`
Explicitly apply given ASN.1 tag object to caller's
:py:class:`~pyasn1.type.tag.TagSet`, then use the result as
new object's ASN.1 tag(s).
subtypeSpec: :py:class:`~pyasn1.type.constraint.ConstraintsIntersection`
Add ASN.1 constraints object to one from the caller, then
use the result as new object's ASN.1 constraints.
Returns
-------
: :py:class:`~pyasn1.type.univ.Boolean`
new instance of Boolean class
"""
return Integer.subtype(self, value, implicitTag, explicitTag)
示例4: clone
# 需要导入模块: from pyasn1.type import constraint [as 别名]
# 或者: from pyasn1.type.constraint import ConstraintsIntersection [as 别名]
def clone(self, value=noValue, **kwargs):
"""Create a copy of a |ASN.1| type or object.
Any parameters to the *clone()* method will replace corresponding
properties of the |ASN.1| object.
Parameters
----------
value: :class:`tuple`, :class:`str` or |ASN.1| object
Initialization value to pass to new ASN.1 object instead of
inheriting one from the caller.
tagSet: :py:class:`~pyasn1.type.tag.TagSet`
Object representing ASN.1 tag(s) to use in new object instead of inheriting from the caller
subtypeSpec: :py:class:`~pyasn1.type.constraint.ConstraintsIntersection`
Object representing ASN.1 subtype constraint(s) to use in new object instead of inheriting from the caller
Returns
-------
:
new instance of |ASN.1| type/value
"""
if value is noValue or value is None:
if not kwargs:
return self
value = self._value
initilaizers = self.readOnly.copy()
initilaizers.update(kwargs)
return self.__class__(value, **initilaizers)
示例5: subtype
# 需要导入模块: from pyasn1.type import constraint [as 别名]
# 或者: from pyasn1.type.constraint import ConstraintsIntersection [as 别名]
def subtype(self, value=noValue, **kwargs):
"""Create a copy of a |ASN.1| type or object.
Any parameters to the *subtype()* method will be added to the corresponding
properties of the |ASN.1| object.
Parameters
----------
value: :class:`tuple`, :class:`str` or |ASN.1| object
Initialization value to pass to new ASN.1 object instead of
inheriting one from the caller.
implicitTag: :py:class:`~pyasn1.type.tag.Tag`
Implicitly apply given ASN.1 tag object to caller's
:py:class:`~pyasn1.type.tag.TagSet`, then use the result as
new object's ASN.1 tag(s).
explicitTag: :py:class:`~pyasn1.type.tag.Tag`
Explicitly apply given ASN.1 tag object to caller's
:py:class:`~pyasn1.type.tag.TagSet`, then use the result as
new object's ASN.1 tag(s).
subtypeSpec: :py:class:`~pyasn1.type.constraint.ConstraintsIntersection`
Add ASN.1 constraints object to one of the caller, then
use the result as new object's ASN.1 constraints.
Returns
-------
:
new instance of |ASN.1| type/value
"""
if value is noValue or value is None:
if not kwargs:
return self
value = self._value
initializers = self.readOnly.copy()
implicitTag = kwargs.pop('implicitTag', None)
if implicitTag is not None:
initializers['tagSet'] = self.tagSet.tagImplicitly(implicitTag)
explicitTag = kwargs.pop('explicitTag', None)
if explicitTag is not None:
initializers['tagSet'] = self.tagSet.tagExplicitly(explicitTag)
for arg, option in kwargs.items():
initializers[arg] += option
return self.__class__(value, **initializers)
示例6: subtype
# 需要导入模块: from pyasn1.type import constraint [as 别名]
# 或者: from pyasn1.type.constraint import ConstraintsIntersection [as 别名]
def subtype(self, value=noValue, **kwargs):
"""Create a copy of a |ASN.1| type or object.
Any parameters to the *subtype()* method will be added to the corresponding
properties of the |ASN.1| object.
Parameters
----------
value: :class:`int`, :class:`str` or |ASN.1| object
Initialization value to pass to new ASN.1 object instead of
inheriting one from the caller.
implicitTag: :py:class:`~pyasn1.type.tag.Tag`
Implicitly apply given ASN.1 tag object to caller's
:py:class:`~pyasn1.type.tag.TagSet`, then use the result as
new object's ASN.1 tag(s).
explicitTag: :py:class:`~pyasn1.type.tag.Tag`
Explicitly apply given ASN.1 tag object to caller's
:py:class:`~pyasn1.type.tag.TagSet`, then use the result as
new object's ASN.1 tag(s).
subtypeSpec: :py:class:`~pyasn1.type.constraint.ConstraintsIntersection`
Add ASN.1 constraints object to one of the caller, then
use the result as new object's ASN.1 constraints.
namedValues: :py:class:`~pyasn1.type.namedval.NamedValues`
Add given object representing symbolic aliases for numbers
to one of the caller, then use the result as new object's
named numbers.
binValue: :py:class:`str`
Binary string initializer to use instead of the *value*.
Example: '10110011'.
hexValue: :py:class:`str`
Hexadecimal string initializer to use instead of the *value*.
Example: 'DEADBEEF'.
Returns
-------
:
new instance of |ASN.1| type/value
"""
return base.AbstractSimpleAsn1Item.subtype(self, value, **kwargs)