Attention is currently required from: dexter, laforge, neels.
1 comment:
File pySim/esim/saip/personalization.py:
Patch Set #13, Line 50: r"""Base class representing a part of the eSIM profile that is configurable during the
abc has no purpose and it doesn't work.
This is quite a bold statement. I don't know what you expect from it, but in my experience it does the job: a) classes that inherit from `abc.ABC` (and their sub-classes that inherit indirectly) cannot be instantiated unless all the abstract methods are defined; b) it clearly tells to whoever is reading the code that it's an abstract class.
I must admit Python's abstract class model is not as advanced as in other languages, like Java or C#. For instance, you can still inherit a class without defining all abstract classmethods in it - this will fail not during parsing, but during instantiation at run-time. Yet it's still better than nothing.
Harald's concern is perfectly valid: using `abc.abstractmethod` but not inheriting from `abc.ABC` will result in the former doing nothing. The ABC magic simply does not work without that.
BTW, the build verification failure is a good argument for using abc stuff:
https://jenkins.osmocom.org/jenkins/job/gerrit-pysim-build/JOB_TYPE=test,a1=default,a3=default,a4=default,label=simtester/2680/consoleFull
```
TypeError: Can't instantiate abstract class Puk1 with abstract method apply_val
```
Looks like there's some mix-up of `apply()` and `apply_val()`?
To view, visit change 39742. To unsubscribe, or for help writing mail filters, visit settings.