aboutsummaryrefslogtreecommitdiff
path: root/pyasn1/type/tag.py
diff options
context:
space:
mode:
authorIlya Etingof <etingof@gmail.com>2017-11-14 11:12:09 +0100
committerGitHub <noreply@github.com>2017-11-14 11:12:09 +0100
commitc34f53e7ee787577482f9e1b67ea507299dd3be3 (patch)
tree1aa1420059f55f824ed4a6ea812386be426ed63f /pyasn1/type/tag.py
parentdc865c255eed64d222cab8bcb9d15e08cc74e2c9 (diff)
downloadpyasn1-c34f53e7ee787577482f9e1b67ea507299dd3be3.tar.gz
added example code snippets to the docstrings (#101)
Diffstat (limited to 'pyasn1/type/tag.py')
-rw-r--r--pyasn1/type/tag.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/pyasn1/type/tag.py b/pyasn1/type/tag.py
index 6c0e2c1..44d6c4e 100644
--- a/pyasn1/type/tag.py
+++ b/pyasn1/type/tag.py
@@ -168,6 +168,23 @@ class TagSet(object):
*superTags: :class:`~pyasn1.type.tag.Tag`
Additional *Tag* objects taking part in subtyping.
+
+ Examples
+ --------
+ .. code-block:: python
+
+ class OrderNumber(NumericString):
+ '''
+ ASN.1 specification
+
+ Order-number ::=
+ [APPLICATION 5] IMPLICIT NumericString
+ '''
+ tagSet = NumericString.tagSet.tagImplicitly(
+ Tag(tagClassApplication, tagFormatSimple, 5)
+ )
+
+ orderNumber = OrderNumber('1234')
"""
def __init__(self, baseTag=(), *superTags):
self.__baseTag = baseTag