diff options
author | Ilya Etingof <etingof@gmail.com> | 2017-11-14 11:12:09 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-14 11:12:09 +0100 |
commit | c34f53e7ee787577482f9e1b67ea507299dd3be3 (patch) | |
tree | 1aa1420059f55f824ed4a6ea812386be426ed63f /pyasn1/type/tag.py | |
parent | dc865c255eed64d222cab8bcb9d15e08cc74e2c9 (diff) | |
download | pyasn1-c34f53e7ee787577482f9e1b67ea507299dd3be3.tar.gz |
added example code snippets to the docstrings (#101)
Diffstat (limited to 'pyasn1/type/tag.py')
-rw-r--r-- | pyasn1/type/tag.py | 17 |
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 |