Change in pysim[master]: pySim-shell: add method to match card profile to card

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

laforge gerrit-no-reply at lists.osmocom.org
Thu Nov 11 18:27:49 UTC 2021


laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/26165 )

Change subject: pySim-shell: add method to match card profile to card
......................................................................


Patch Set 4:

(2 comments)

https://gerrit.osmocom.org/c/pysim/+/26165/3/pySim/profile.py 
File pySim/profile.py:

https://gerrit.osmocom.org/c/pysim/+/26165/3/pySim/profile.py@31 
PS3, Line 31: _
> I don't think that it is so simple. The order matches. With __subclasses__() we get a random order. […]
Ok, then it's not that simple, I stand corrected.

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.


https://gerrit.osmocom.org/c/pysim/+/26165/3/pySim/ts_51_011.py 
File pySim/ts_51_011.py:

https://gerrit.osmocom.org/c/pysim/+/26165/3/pySim/ts_51_011.py@977 
PS3, Line 977: def _match_witch_card(scc:SimCardCommands) -> bool:
> I thought that this would help to make the actual class more readable because it is shorter then.
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.

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.



-- 
To view, visit https://gerrit.osmocom.org/c/pysim/+/26165
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: If090d32551145f75c644657b90085a3ef5bfa691
Gerrit-Change-Number: 26165
Gerrit-PatchSet: 4
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann at sysmocom.de>
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-Reviewer: osmith <osmith at sysmocom.de>
Gerrit-Comment-Date: Thu, 11 Nov 2021 18:27:49 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge <laforge at osmocom.org>
Comment-In-Reply-To: dexter <pmaier at sysmocom.de>
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20211111/0ed55f40/attachment.htm>


More information about the gerrit-log mailing list