Keep memory of the previous stimulus (Staircase handler)

Hi everyone,
I am programming a stop signal task. In this task, participants typically perform a go task (e.g. press left when an arrow pointing to the left appears, and right when an arrow pointing to the right appears), but on a minority of the trials, a stop signal (e.g. a cross replacing the arrow) appears, instructing participants to suppress the imminent go response.
I’m trying to create a staircase handler and i need your help. I need psychopy keep the last stop signal target in memory and set the new target according to the last. For this reason I put in my code:

In begin experiment of code

Inital Stop Signal Start Time

ssigStartThis = 1.3
ssigStartLast = ssigStartThis

Inital Stop Signal Duration

ssigDur = 2.5 - ssigStartThis

In the end routine of code
if ssig and SST_resp.corr:
ssigStartThis = ssigStartLast + 0.05
ssigDur = 2.5 - ssigStartThis
elif ssig and not SST_resp.corr:
ssigStartThis = ssigStartLast - 0.05
ssigDur = 2.5 - ssigStartThis

Legend:
ssigStartThis = when start the target
ssigStartLast = last stop target
ssigDur = duration of target
SST_resp.corr = correct response
ssig = whet the target is a Stop target

The problem is that ssigStartThis must change according to the previous Stop target and instead actualy it refers to the initial value that I attributed to it (ie 1.3). Actually, if the last response is incorrect the new target is 1.35 and if the last response is correct the new target is 1.25. Instead I need that ssigStartThis to start from the previous value and not from the initial value, for example if the last target is 1.25 and the next one is wrong, it must be 1.20 and not again 1.25.

I hope in your help.
Thank you in advance