My boss asked me this morning who was going to win the special U.S. House election between former Gov. Mark Sanford (R-South Carolina) and his Democratic opponent, Elizabeth Colbert Busch, sister of comedian extraordinaire Stephen Colbert. I told him Sanford was going to win by about 52% to 48%. I was a little short on the margin, which ended up around 55%-45%, but correct on the result.

I was able to pick Sanford in part because the polling had swung wildly in his direction, but also due to the inescapable fact that the 1st District of South Carolina is heavily Republican. It voted for Mitt Romney by 18 percentage points last year, a significantly larger margin than Romney achieved in the state as a whole. And if your district is to the right of South Carolina as a whole, it’s not voting for any Democrat, regardless of circumstances.

I also picked Sanford because of the trend we are seeing across the country, which is that voters are voting much more based on ideology than on personal characteristics. We saw an example of this in the easy reelection of Sen. David Vitter (R-Louisiana) despite his prostitution scandal.

It is true that sometimes, people go against their own partisan grain if their party’s candidate says or does something particularly offensive, and we saw that in the landslide defeat last year of former U.S. Rep. Todd Akin (R-Missouri) in his Senate race against Sen. Claire McCaskill (D-Missouri). I’m not convinced that Akin would have won that race if he hadn’t made his idiotic comment about rape—I think McCaskill is a much better politician than she gets credit for, and I cannot believe that her landslide win was entirely due to Akin’s flub—but I think it’s clear that the race would have been much closer without Akin’s disastrous gaffe.

That said, it appears, more and more, that while some mistakes can still sink a candidate, a candidate’s marital infidelity is no longer one of those fatal miscues. Admittedly, this hasn’t really been tested when it comes to female candidates—and it would be interesting to see how such a scenario would play out—but can you name the last male candidate for high office who lost an election, which he otherwise would likely have won, strictly because he cheated on his wife? We might have to go back to Gary Hart, whose promising 1988 presidential run tanked after he was discovered to be having an affair.

For all the talk about “family values” and the “sanctity of marriage” emanating from the GOP, Republicans in South Carolina’s 1st District had no qualms today about sending an admitted adulterer to represent them in Congress, just as their Republican compatriots in Louisiana had no issue reelecting Vitter. And on the other side, the job approval of Democratic President Bill Clinton was never higher than it was when Republicans—led by confirmed adulterers Newt Gingrich and Henry Hyde—impeached him for the fallout surrounding his affair with an intern.

It looks like the big lesson from Mark Sanford’s victory tonight was that marital infidelity doesn’t matter in politics, as long as a candidate remains faithful to the ideology of his constituents.