Attention is currently required from: dexter, fixeria.
1 comment:
File pySim/esim/saip/personalization.py:
Patch Set #6, 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 change 39742. To unsubscribe, or for help writing mail filters, visit settings.