This is not due to a change in print , but to a change in the __str__ floats function, which prints implicitly calls. Therefore, when you type, it calls a call:
# For Python 2.7 >>> print (1.2 - 1.0).__str__() 0.2
To display floating values ββas is, you can explicitly call .__repr__ as:
>>> print (1.2 - 1.0).__repr__() 0.19999999999999996
See Martjin's answer on floating point behavior in Python 2.6 vs 2.7 , which says:
In Python 2.7, only the view has changed, not the actual values. Floating-point values ββare still binary approximations of real numbers, and binary fractions do not always coincide with the exact number.
source share