Ah, got it. I had to fix the indentation in your code (I assume it works for you and got messed up in the copy-paste, otherwise it wouldn't work at all).
The problem is that you're using platform.surf.get_rect(), when instead you should just use platform.rect. See, each call to...