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=ema... : 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!