Heck no! In all probability, pepper spray would probably make the attacker furious, and inclined to do a lot more harm.....
It actually does. Saw one black dude got pepper sprayed back in high school by our school security guy and he just got more pissed off and smoked the poor security guy. We then ganged up on the guy as apparently later on, the principal told us he was stalking one of our coed classmates and had a criminal record.