<blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;"><p style="white-space: pre-wrap; word-wrap: break-word;">The other thing: how would I encode an array of TLVs all with the same tag, and is the order preserved?<br>```<br>t = FIX_TLV()<br>t[0x80] = 123<br>t[0x80] = 321<br>```<br>This will of course just override the single 0x80 item.</p></blockquote><pre style="font-family: monospace,monospace; white-space: pre-wrap;">Same applies for decoding, only the last element with a specific tag is decoded:<br>```<br>    t = FIX_TLV()<br> t.parse_array([0x80, 0x01, 0xff, 0x80, 0x01, 0xee])<br>   print(t.tree())<br>       t.parse_array([0x81, 0x01, 0xff, 0x80, 0x01, 0xee])<br>   print(t.tree())<br>```<br>output:<br>```<br>80: ee</pre><p style="white-space: pre-wrap; word-wrap: break-word;">80: ee<br>81: ff<br>```</p><p style="white-space: pre-wrap; word-wrap: break-word;">Expected:<br>```<br>80: ee<br>80: ff</p><p style="white-space: pre-wrap; word-wrap: break-word;">80: ee<br>81: ff<br>```</p><p><a href="https://gerrit.osmocom.org/c/pysim/+/23483">View Change</a></p><ul style="list-style: none; padding: 0;"></ul><p>To view, visit <a href="https://gerrit.osmocom.org/c/pysim/+/23483">change 23483</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/c/pysim/+/23483"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: pysim </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I971b818836aff2fbeb6769f819d496cee4bfa7cf </div>
<div style="display:none"> Gerrit-Change-Number: 23483 </div>
<div style="display:none"> Gerrit-PatchSet: 4 </div>
<div style="display:none"> Gerrit-Owner: dexter <pmaier@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: daniel <dwillmann@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-Reviewer: merlinchlosta <merlin.chlosta@rub.de> </div>
<div style="display:none"> Gerrit-Comment-Date: Fri, 02 Apr 2021 09:14:34 +0000 </div>
<div style="display:none"> Gerrit-HasComments: No </div>
<div style="display:none"> Gerrit-Has-Labels: No </div>
<div style="display:none"> Gerrit-MessageType: comment </div>