def colored(what, *args, **kwargs):
return what
-__version__ = "6.3"
+__version__ = "7.0"
__all__ = (
"Any",
v = b"".join(raws)
return b"".join((self.tag, len_encode(len(v)), v))
- def _specs_items(self):
- return iteritems(self.specs)
-
def _decode(self, tlv, offset, decode_path, ctx, tag_only):
try:
t, tlen, lv = tag_strip(tlv)
ctx_allow_default_values = ctx.get("allow_default_values", False)
ctx_allow_unordered_set = ctx.get("allow_unordered_set", False)
value_prev = memoryview(v[:0])
+ _specs_items = copy(self.specs)
while len(v) > 0:
if lenindef and v[:EOC_LEN].tobytes() == EOC:
break
- for name, spec in self._specs_items():
+ for name, spec in iteritems(_specs_items):
sub_decode_path = decode_path + (name,)
try:
spec.decode(
offset=sub_offset,
)
values[name] = value
+ del _specs_items[name]
value_prev = v[:value_len]
sub_offset += value_len
vlen += value_len
v = v_tail
+
obj = self.__class__(
schema=self.specs,
impl=self.tag,