I don't understand how python2.7 checks for the 'less than' comparison operator.
For example if I run the following function
def f():
    P = 0.6
    while P <= 4.0:
           if P < 2.0:
                print(P)
                P += 0.2
                print(P)
                print("-")
            elif P < 10.0:
                P += 2.0
produces the following output:
  0.6
  0.8
  -
  0.8
  1.0 
  -
  1.0
  1.2
  -
  1.2
  1.4
  -
  1.4
  1.6
  -
  1.6
  1.8
  -
  1.8
  2.0
  -
  2.0
  2.2
  -
According to what I understand, I should never see the value of 2.2, but go directly to 4.0 after the value of 2.0. What am I missing? I am using Python 2.7.3 on a linux machine.
Thanks for the help.
