If you're a woman dreaming of a career in U.S. politics, the current fight between Donald Trump and Hillary Clinton might be enough to make you run in the opposite direction of Capitol Hill. The misogyny that has bubbled on the campaign trail is unlike anything America has ever seen.

In a now-famous comment, Trump accused Clinton of playing the "woman card," then proceeded to explain—in case it wasn't clear—"Frankly, if Hillary Clinton were a man, I don't think she'd get 5% of the vote." He once tweeted, "If Hillary Clinton can't satisfy her husband, what makes her think she can satisfy America?" And he's also drawn on age-old sexist tropes, making the case that Clinton is too weak to enter the Oval Office. "She will not be a good president," he said. "She doesn't have the strength. She doesn't have the stamina."

"Likability is directly linked to women's electability as candidates, which is not something male candidates need to achieve."

This kind of rhetoric might suggest that politics is a field that is still very inhospitable to women. This is certainly what the majority of Americans believe. In a 2008 Pew survey, 79% of the public said that one reason there aren't more women in office is that voters aren't ready to elect them, and 75% said that women in party politics are held back by men. When Hillary Clinton lost the Democratic primary in 2008, journalist Katie Couric said, "One of the lessons of that campaign is the continued and accepted role of sexism in American life, particularly in the media."

But according to Jennifer Lawless, a professor at American University in Washington, D.C., these isolated examples of sexist behavior are not representative of what politics is like these days. In a recently published book called Women on the Run that she cowrote with Danny Hayes, they provide a comprehensive, quantitative look at how women fare in elections.

They find that over the last decade, the sex of the candidate has very little influence on how they run for office, on how the media covers them, and on voters' perceptions. During the campaign, female candidates emphasized the same issues as their male counterparts on TV ads and in Twitter posts. For example, the authors find that candidates spent less than 5% of their ad time covering issues that predominantly affect women, such as abortion and child care—-and this was true for both male and female candidates.

Voters also did not penalize candidates for being female, giving similar ratings to male and female candidates for competency, leadership, empathy, and trustworthiness. When interviewing voters about their candidates, respondents were slightly more likely to mention positive traits about female candidates than male ones (23.2% versus 20.9% for Democrats, and 19.2% versus 15.4% for Republicans). "There can be episodes of sexist behavior, and that's different than a systematically sexist political landscape," Lawless tells Fast Company.

There can be episodes of sexist behavior, and that's different than a systematically sexist political landscape.

But not everyone agrees with Lawless and Hayes's analysis. Adrienne Kimmell, executive director of the Barbara Lee Family Foundation, an organization that studies women's representation in politics, believes that there can be a discrepancy between what people say and what they think. "Unconscious gender bias is a real thing," Kimmel says. "Our research has shown time and again that people believe there needs to be more women elected officials, but it does not predict to their vote."

As Lawless and Hayes studied over 800 congressional races from 2010 and 2014, they certainly saw evidence of sexist rhetoric and behavior, such as people saying that a woman was not qualified because of her sex, or a male candidate having a men's-only fundraiser against a female opponent. "We want to be clear that those things can happen on occasion, but that does not characterize the overwhelming majority of candidate experience and it is also not detrimental to the outcome of the race," Lawless says.

Of course, this wasn't always the case. Lawless recognizes that there was a time when it was incredibly difficult for a woman to get elected because of her gender. She cites many examples of women who faced major obstacles in the 1970s. California Senator Barbara Boxer, for instance, famously described her experience in politics as an "almost masochistic experience." Patricia Schroeder, who ran for the House of Representatives in 1972, was not supported by the National Women's Political Caucus (an organization she helped found) because "it was too early for a woman to run for Congress."

Lawless believes there are two things that have made things better for female candidates. First, voting for a woman is no longer a novelty. "In the 1980s and the 1990s, female candidates were far more novel than they are today. So covering them as women and giving attention to their family background was newsworthy in and of itself, because it did not happen that often," she says. And even though women only make up a fifth of Congress, most voters have encountered a female candidate on the ballot either in their district or in their state elections.

Secondly, she says that the political parties have become increasingly polarized. "Party affiliation has become the most important factor to voters," she says. "Differentiating yourself from your opponent on a party basis is the most important thing for a candidate to do. The sex of a candidate does not have that much room to have an effect."

Barbara Boxer famously described her experience in politics as an "almost masochistic experience."

While Kimmell's research also finds that party trumps gender, she does add the caveat that women need to be liked to be elected. "Likability is directly linked to their electability as candidates," she says. "That is not something male candidates need to achieve."

Many people find Lawless's findings very surprising. It goes against much of what we hear about every day. But this is perhaps part of the reason there's a gap between perception and reality: The media tends to highlight moments of sexism, which makes it seem like this is what it is like as a whole in politics. This is particularly obvious in the current election.

Lawless believes that there are three reasons that we continue to believe that politics is deeply sexist.

High-profile episodes of sexism. Hillary Clinton, for example, has been the target of a lot of sexism, both during this election and in 2008. And this kind of news coverage tends to overwhelm coverage of smaller races, where women are running against men and there is little sexism at work. "It perpetuates the idea that all women who run for office are going to be treated this way," Lawless says. "People extrapolate from it, reasonably so. But it's not true that those cases generalize downward."

Women's personal experiences. Many women have experienced moments of discrimination or sexism in their own lives and careers. "These are very real and very prevalent, and this is how they make assessments about how the world works," Lawless says. "They assume that it could only be worse in politics, where 80% of people are men."

The media doesn't give a sense of scale. When the media highlights a situation where women were not treated well, it does not contextualize it by explaining what fraction of the candidate's experiences they were. One example Lawless offers, for instance, is Kristen Gillibrand's book Off the Sidelines. Published in 2014, it received a lot of media attention for one anecdote in which she wrote about how her male colleagues told her not to lose more weight because they liked their girls chubby. "That was almost exclusively the coverage that the book got," Lawless says. "People come away, not having read the book, thinking this is a book about all of the terrible things that happens when women are in the Senate. And that was not the argument she was making at all."

Lawless believes that this perception that the political arena dissuades competent and qualified women from running for office is why there are still so few women in the top ranks of government. In other research she has done, she's found that there is a substantial gap in political ambition between men and women. "Women are less likely than men to even consider running for office," she says. "One of the biggest reasons we find for this is because they think they would have to be twice as good to get half as far because there's rampant sexism and bias."

Women are less likely than men to even consider running for office.

Trump's widely repeated sexist remarks are only exacerbating the problem, and because this is a presidential election, his bombast is covered by the press extensively and for a prolonged period of time. "This election is way worse than anything we've ever seen before, and it's so high profile that it is going to be the basis by which people make assessments about what it must be like everywhere else," Lawless says. "Only time will tell what the impact will be." One possible outcome is that this election will further persuade women that politics is an impossible place for a women.

Part of what she is trying to do with this book is to provide data that debunks the myth that politics is overwhelmingly sexist. "We think that if some context is provided, especially during this election cycle, maybe we can mitigate some of the damage that will likely ensue," she says.

Never miss a story.

Sign up for the Leadership newsletter and get the best stories delivered to your inbox daily.