Composition of tags¶
-
class
pyasn1.type.tag.
TagSet
(baseTag=(), *superTags)¶ Create a collection of ASN.1 tags
Represents a combination of
Tag
objects that can be attached to a ASN.1 type to make types distinguishable from each other.TagSet objects are immutable and duck-type Python
tuple
objects holding arbitrary number ofTag
objects.Parameters: -
tagExplicitly
(superTag)¶ Return explicitly tagged TagSet
Create a new TagSet representing callee TagSet explicitly tagged with passed tag(s). With explicit tagging mode, new tags are appended to existing tag(s).
Parameters: superTag ( Tag
) – Tag object to tag this TagSetReturns: TagSet
– New TagSet object
-
tagImplicitly
(superTag)¶ Return implicitly tagged TagSet
Create a new TagSet representing callee TagSet implicitly tagged with passed tag(s). With implicit tagging mode, new tag(s) replace the last existing tag.
Parameters: superTag ( Tag
) – Tag object to tag this TagSetReturns: TagSet
– New TagSet object
-
isSuperTagSetOf
(tagSet)¶ Test type relationship against given TagSet
The callee is considered to be a supertype of given TagSet tag-wise if all tags in TagSet are present in the callee and they are in the same order.
Parameters: tagSet ( TagSet
) – TagSet object to evaluate against the calleeReturns: bool
– True if callee is a supertype of tagSet
-