<p><a href="https://gerrit.osmocom.org/c/pysim/+/24035">View Change</a></p><p>6 comments:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/c/pysim/+/24035/2/pySim/utils.py">File pySim/utils.py:</a></p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/pysim/+/24035/2/pySim/utils.py@869">Patch Set #2, Line 869:</a> <code style="font-family:monospace,monospace">DataObject</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">Is this an abstract class?</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">I still have my troubles understanding the 'abc' documentation. I read it several times during past mongs, to no help. It seems to discuss all kinds of things we're not really doing here and uses al ot of language that's hard to understand for me.</p><p style="white-space: pre-wrap; word-wrap: break-word;">Your recent examples look super simlpe in terms of what they do to the code, but I somehow am not certain enough that we're using it like it's documented.</p><p style="white-space: pre-wrap; word-wrap: break-word;">So to answer your question: I have no fxcing clue if what I'm doing here falls within the documented use cases of an abc.ABC, sorry.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/pysim/+/24035/2/pySim/utils.py@873">Patch Set #2, Line 873:</a> <code style="font-family:monospace,monospace">this</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">cosmetic: missing dot</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Ack</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/pysim/+/24035/2/pySim/utils.py@884">Patch Set #2, Line 884:</a> <code style="font-family:monospace,monospace">        self.encoded = None</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">One of these should be 'decoded' I guess, and this is why pylint complains.</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Ack</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/pysim/+/24035/2/pySim/utils.py@972">Patch Set #2, Line 972:</a> <code style="font-family:monospace,monospace">from_value</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">Sounds more like from_bytes() given that it accepts 'bytes'?</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Ack</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/pysim/+/24035/2/pySim/utils.py@985">Patch Set #2, Line 985:</a> <code style="font-family:monospace,monospace">members=[]</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">Using objects, lists, and tuples as a default argument value is dangerous because all instances of t […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Ah yes, I read about this some time ago, but forgot it. </p><p style="white-space: pre-wrap; word-wrap: break-word;">How would you work around this here? I don't want to manually call the 'add' operator here inf my use cases (see following patch) where I want a compact syntax to intiialize a collection/choice with various members.</p></li><li style="margin: 0; padding: 0 0 0 16px;"><p style="margin-bottom: 4px;"><a href="https://gerrit.osmocom.org/c/pysim/+/24035/2/pySim/utils.py@991">Patch Set #2, Line 991:</a> <code style="font-family:monospace,monospace">        for m in self.members:</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">This could be done using the comprehension: […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">but how would I select the m.tag / m.name here? </p><pre style="font-family: monospace,monospace; white-space: pre-wrap;"> self.members_by_tag = { m.tag:m for m in members }</pre></li></ul></li></ul><p>To view, visit <a href="https://gerrit.osmocom.org/c/pysim/+/24035">change 24035</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/+/24035"/><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: Iac18e7665481c9323cc7d22a3cd93e3da7869deb </div>
<div style="display:none"> Gerrit-Change-Number: 24035 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: dexter <pmaier@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: fixeria <vyanitskiy@sysmocom.de> </div>
<div style="display:none"> Gerrit-Comment-Date: Mon, 03 May 2021 12:18:07 +0000 </div>
<div style="display:none"> Gerrit-HasComments: Yes </div>
<div style="display:none"> Gerrit-Has-Labels: No </div>
<div style="display:none"> Comment-In-Reply-To: fixeria <vyanitskiy@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: comment </div>