Min and max are actual readings, already with their real precision. The mean is computed and can have a long float tail, so rounding it makes the dict clean for every consumer (dashboard, report, alerts).
BEBellaRossiOPreplies: 1
Makes sense, min/max are real values.
SOSophieDev
And the empty case with None values keeps the same shape. Consumers don't need special handling for missing keys.
AMAmeliaRuns
Returning a dict means callers pick what they need. Much better than printing four lines inside.
Comments 4
Log in to join the discussion.
Log in Create accountMin and max are actual readings, already with their real precision. The mean is computed and can have a long float tail, so rounding it makes the dict clean for every consumer (dashboard, report, alerts).
Makes sense, min/max are real values.
And the empty case with None values keeps the same shape. Consumers don't need special handling for missing keys.
Returning a dict means callers pick what they need. Much better than printing four lines inside.