It's not that James Bond is a woman, it's that James Bond retires and the new designated 007 is a woman.
As for Thor, in the comics there was a period where Thor believed himself unworthy and therefor could no longer lift his Hammer. (which has an enchantment on it that whoever lifts this hammer, if he be worthy, shall possess the power of Thor.) While he couldn't lift it, his ex-gf, Jane Foster, took up the hammer for a while. It was also interesting because in her mortal form she was undergoing chemotherapy for cancer, and the transformation would wipe the drugs out of her body, making her sicker each time she transformed.