I'm going to have to say that most people assume that by "hitting a woman", you are holding her against a wall and beating her repeatedly to within an inch of her life. Of course, when you say "hitting a man" people think a punch landing in the face or something, and it's not nearly as taboo as hitting a woman.
In a situation where a woman is attacking you, it is possible to hit her without beating her down, mediums ARE available. In these situations, if the woman is physically weaker and less skilled than you, a restraint might be more warranted than a strike. I myself have been in a situation like that with a man, where I was thrown a punch, landed on my eye, it was clearly not up to snuff, so I got him in a lock and held him down until the teacher came and shuffled him to the principal's office.
If the woman is stronger than you, then by all means do what you have to do to get out of the situation, but don't escalate it anymore than she needs to.
By the way, to address the off-topic situation, I got the feeling that he was talking about a rowdy female attacker spouting obscenities at you while walking down the street, before I started thinking of domestic violence. My mind went to it, sure, but it was after I thought of a street attack. Sounds like a very good example of our respective psyche's to see what all our minds jumped to first.