-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Labels
PythonPython codePython code
Description
Yeah, I don't like all those magic values either; that's indeed ugly... :-(
But I don't really want to introduce constants for each such values either: given each variable may have its own special value to define it is unavailable, that would make for a lot of contants, which would not be much better...
The ETSI.si2etsi() prototype is:
class ETSI:
def si2etsi(
value: float | None,
scale: float,
undef: Optional[int] = None,
validity_range: Optional[dict] = None,
out_of_range: Optional[int] = None,
) -> int:In retrospect, I see two issues there:
- the
undefparameter should have been namedunavailable(orundefined) - the parameters should have been keyword-only, so when called, it would be obvious that the value being passed as
undefined(orunavailable) was exactly that: undefined (or unavailable).
So, I would like to address this in a followup change, if that's OK for you?
Originally posted by @ymorin-orange in #459 (comment)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
PythonPython codePython code
Type
Projects
Status
Ready