You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be nice if we could get the unit name together with a value without having to go and get the unit conv object.
A possible implementation would be to add an optional argument e.g. formatted to e.g. element.get_value which would make it return a string with a few digits of precision and the units.
People may want then to specify the precision...
The text was updated successfully, but these errors were encountered:
This is a good idea. However, I would suggest a new method for returning formatted data like this for three reasons:
I think there are already lots of optional arguments to get_value, so I am cautious about adding more.
This feels like something ripe for future expansion, i.e. also returning the PV name, conversion limits ect., which would not be as feasible if it were embedded inside get_value.
Calling a method that then calls get_value and get_unitconv and then formats and returns the value and the appropriate units feels more intuitive to me than tacking it onto the end of get_value.
It would be nice if we could get the unit name together with a value without having to go and get the unit conv object.
A possible implementation would be to add an optional argument e.g.
formatted
to e.g.element.get_value
which would make it return a string with a few digits of precision and the units.People may want then to specify the precision...
The text was updated successfully, but these errors were encountered: