Attention is currently required from: dexter, fixeria.
neels has posted comments on this change by neels. (
https://gerrit.osmocom.org/c/pysim/+/39742?usp=email )
Change subject: [2/6] personalization: refactor ConfigurableParameter, Iccid, Imsi
......................................................................
Patch Set 6:
(1 comment)
File pySim/esim/saip/personalization.py:
https://gerrit.osmocom.org/c/pysim/+/39742/comment/510ae754_497088fe?usp=em… :
PS6, Line 117: If self.value is None, first call self.validate() to generate a
sanitized self.value from self.input_value.
This comment reads like if it were the API users task
to call self.validate if self.value is none. […]
I see how this creates a
misunderstanding: I always write API docs in the "imperative mood", which is
like instructing someone who is implementing the function. Like
~~~
Iterate all numbers from 0 to max and return a list of prime numbers in that range.
~~~
Because this form is concise, the shortest possible form, compare:
~~~
This function interates all numbers from 0 to max and then returns a list of prime numbes
in that range.
~~~
But this may sound like the caller should do it:
~~~
first call self.validate()
~~~
The intention was the opposite.
I guess this is a case where the imperative mood doesn't work so well...
~~~
Implicitly call self.validate() when self.value is None.
~~~
kind of works, but:
~~~
self.validate() is called implicitly when...
~~~
thanks!
--
To view, visit
https://gerrit.osmocom.org/c/pysim/+/39742?usp=email
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I6522be4c463e34897ca9bff2309b3706a88b3ce8
Gerrit-Change-Number: 39742
Gerrit-PatchSet: 6
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 13 Mar 2025 22:08:16 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: dexter <pmaier(a)sysmocom.de>