aboutsummaryrefslogtreecommitdiff
path: root/pyasn1/type/base.py
diff options
context:
space:
mode:
authorIlya Etingof <etingof@gmail.com>2017-03-12 11:12:13 +0100
committerIlya Etingof <etingof@gmail.com>2017-03-12 11:48:45 +0100
commit7b6b472d0aa9a7b052e599bfcc12712b50d7339a (patch)
treeeacfc6d2094727006d683c8afd1bcfe9ce25f04d /pyasn1/type/base.py
parentd94654b0d31896f875cfcc2e8c13c5c69a5dcb83 (diff)
downloadpyasn1-7b6b472d0aa9a7b052e599bfcc12712b50d7339a.tar.gz
.getComponent*() changed to lazily instantiate underlying type
Also: * SetOf/SequenceOf types can not have "holes" anymore * optional/default components of constructed types refactored for better efficiency and flexibility.
Diffstat (limited to 'pyasn1/type/base.py')
-rw-r--r--pyasn1/type/base.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/pyasn1/type/base.py b/pyasn1/type/base.py
index e6e4cad..39f89d7 100644
--- a/pyasn1/type/base.py
+++ b/pyasn1/type/base.py
@@ -446,7 +446,6 @@ class AbstractConstructedAsn1Item(Asn1ItemBase):
else:
self._sizeSpec = sizeSpec
self._componentValues = []
- self._componentValuesSet = 0
def __repr__(self):
representation = []
@@ -588,6 +587,7 @@ class AbstractConstructedAsn1Item(Asn1ItemBase):
def getComponentType(self):
return self._componentType
+ # backward compatibility -- no-op
def setDefaultComponents(self):
pass
@@ -606,7 +606,6 @@ class AbstractConstructedAsn1Item(Asn1ItemBase):
def clear(self):
self._componentValues = []
- self._componentValuesSet = 0
# backward compatibility
def getComponentTagMap(self):