Added list around calls to items for Python 3 compatibility

This commit is contained in:
Ryan Dwyer
2015-01-13 16:17:23 -05:00
parent a85eceff3b
commit 7e8b856230

View File

@@ -274,8 +274,8 @@ class _Quantity(SharedRegistryObject):
magnitude = q_base.magnitude
# Only changes the prefix on the first unit in the UnitContainer
unit_str = q_base._units.items()[0][0]
unit_power = q_base._units.items()[0][1]
unit_str = list(q_base._units.items())[0][0]
unit_power = list(q_base._units.items())[0][1]
if unit_power > 0:
power = math.floor((math.log(magnitude, 1000) / unit_power)) * 3