blend_in/blend_out doesn't work

I have a python script that adds NLA strips, including blend in/out values for the strip. However, the blend in value always comes out as 1 and the blend out value always comes out as 0. The following code is part of my script:


   strip.blend_in = b1
   strip.blend_out = b2
   print("BLEND", b1, b2, strip.blend_in, strip.blend_out)

The result of the print statement is:


BLEND 45.0 25.0 1.0 0.0
BLEND 45.0 25.0 1.0 0.0
BLEND 20.0 40.0 1.0 0.0
BLEND 20.0 0.0 1.0 0.0

I find it confusing that I enter values into strip.blend_in and strip.blend_out, but the output is always 1 and 0. I tried accessing blend_in/blend_out from the interactive python console and everything worked the way I expected.

Never mind. I fixed it. It turns out I had to move the code that sets the blend in/out values to after where I set the end frame for the strip.