Not quite sure why this has been bumped but seeing as it has been I will take the opportunity to reiterate my previous statements.
I find that I attract almost no hassle whatsoever when I am alone in Marrakech. When I'm with my husband it is always considerably more. A Moroccan friend told me it is probably because they assume I must either live there or, at least know exactly what I am doing - why else would a 33 year old English woman be wandering around by herself? She certainly wouldn't be looking for a henna tattoo or a rug!
Whatever the reason, I feel perfectly safe - and I avoid dark alleys or unknown passageways for exactly the same reason that I avoid them at home. Because it is the sensible thing to do and because I take personal responsibility for my own safety- not because I think muggers and rapists are lurking around every corner.
My husband is not a big fan of the central medina at night due to the general level of noise and bustle. So if he wants to stay in and read, that's what he does and I walk down to the square by myself and get some dinner and I'll pick up something to take back to him. He's no more worried about my safety than if I were on a night out in Blackpool - actually he'd never let me go out alone in the centre of Blackpool at night.
Maybe I'm just not pretty enough to attract the amount of unwanted male attention other women have experienced or maybe I just don't notice or take it seriously.
Any visitor, male or female, can feel uncomfortable in a strange country and I do feel sorry for anyone who has had an unpleasant trip because of that. I just wanted to point out again that the PERCEIVED risk of danger is far, far greater than the ACTUAL physical risk.
Attitude is everything - if someone shouts "salut la gazelle!" just smile, thank them and feel smug that you received a compliment. Don't take it as sexual harassment.