From 2bf041f46d4b59348b3812511e23a18b896903fe Mon Sep 17 00:00:00 2001 From: Nevada Sanchez Date: Thu, 21 Jan 2016 14:15:25 -0500 Subject: [PATCH] Sort multiplicative units for deterministic conversion. --- pint/unit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pint/unit.py b/pint/unit.py index 9acdae5..49a90cb 100644 --- a/pint/unit.py +++ b/pint/unit.py @@ -944,7 +944,7 @@ class UnitRegistry(object): return base_factor, destination_units def _get_root_units_recurse(self, ref, exp, accumulators): - for key in ref: + for key in sorted(ref): exp2 = exp*ref[key] key = self.get_name(key) reg = self._units[key]