diff --git a/pint/unit.py b/pint/unit.py index 2de2da7..a6f00c7 100644 --- a/pint/unit.py +++ b/pint/unit.py @@ -943,7 +943,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]