<p><a href="https://gerrit.osmocom.org/c/pysim/+/26165">View Change</a></p><p>2 comments:</p><ul style="list-style: none; padding: 0;"><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/c/pysim/+/26165/3/pySim/profile.py">File pySim/profile.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/+/26165/3/pySim/profile.py@31">Patch Set #3, Line 31:</a> <code style="font-family:monospace,monospace">_</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">I don't think that it is so simple. The order matches. With __subclasses__() we get a random order. […]</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">Ok, then it's not that simple, I stand corrected.</p><p style="white-space: pre-wrap; word-wrap: break-word;">I still think there should be more elegant ways than manually maintaining a list of those classes, but we can revisit that at a later point, and shouldn't postpone this patch for this.</p></li></ul></li><li style="margin: 0; padding: 0;"><p><a href="https://gerrit.osmocom.org/c/pysim/+/26165/3/pySim/ts_51_011.py">File pySim/ts_51_011.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/+/26165/3/pySim/ts_51_011.py@977">Patch Set #3, Line 977:</a> <code style="font-family:monospace,monospace">def _match_witch_card(scc:SimCardCommands) -> bool:</code></p><p><blockquote style="border-left: 1px solid #aaa; margin: 10px 0; padding: 0 10px;">I thought that this would help to make the actual class more readable because it is shorter then.</blockquote></p><p style="white-space: pre-wrap; word-wrap: break-word;">sorry, but this argument doesn't hold up.  In this line of thinking, every method of every class would first be defined as a global/public function, and then called from the class.</p><p style="white-space: pre-wrap; word-wrap: break-word;">I would argue that in OO programming you want to avoid any global/public functions in general, and everything should be methods (normal, staticemthod, classmethod).  In reality you may need some functions, but unless there is a clear-cut use case for a non-OO function, the code should be a method.</p></li></ul></li></ul><p>To view, visit <a href="https://gerrit.osmocom.org/c/pysim/+/26165">change 26165</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/+/26165"/><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: If090d32551145f75c644657b90085a3ef5bfa691 </div>
<div style="display:none"> Gerrit-Change-Number: 26165 </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: osmith <osmith@sysmocom.de> </div>
<div style="display:none"> Gerrit-Comment-Date: Thu, 11 Nov 2021 18:27:49 +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: laforge <laforge@osmocom.org> </div>
<div style="display:none"> Comment-In-Reply-To: dexter <pmaier@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: comment </div>