I would have used:
if globals.useRalphsTweaks && self == globals.player && false:
Your way works, but made the code redundant.