It is hopelessly retro, but perhaps unsurprising, that womanhood has become a prominent issue in the presidential race. This has to be bad for Donald Trump, a hall-of-shame sexist — and good for Hillary Clinton, an actual woman.

It was political idiocy for Trump to fall into Clinton’s artfully laid trap at the debate Monday night when she mentioned how he treated the woman who won his Miss Universe pageant in 1996: “He called this woman ‘Miss Piggy.’ Then he called her ‘Miss Housekeeping,’ because she was Latina. Donald, she has a name.”

Clinton was referring to Alicia Machado, whom Trump threatened with taking away her title after she gained a few pounds. Trump seemed flustered and could only respond with a complete non sequitur — a defense of the many ugly things he has said about comedian Rosie O’Donnell, maintaining that “I think everybody would agree that she deserves it and nobody feels sorry for her.”

I, for one, do not think O’Donnell, or any other woman, deserves being called “a slob” who is “disgusting” and has “a fat, ugly face,” among other gross insults Trump has hurled over the years. But aside from congratulating himself for his restraint in not saying something “extremely rough to Hillary, to her family,” Trump had no response to the question of his treatment of Machado.

But the following morning on “Fox and Friends,” Trump could not resist elaborating. He said of Machado that “she was the winner and, you know, she gained a massive amount of weight and it was a real problem . . . not only that, her attitude.” He called her “the worst we ever had. The worst. The absolute worst. She was impossible.”

This archive video from 1997 shows Republican presidential nominee Donald Trump with his now outspoken critic, former Miss Universe Alicia Machado. (Reuters)

Machado did go on a diet during her Miss Universe reign after gaining, she said, about 15 pounds. Trump went on Fox News again Wednesday and told Bill O’Reilly that by fat-shaming Machado, “I saved her job. . . . And look what I get out of it. I get nothing.”

So who here is being piggy?

The Clinton campaign had anticipated that raising the Machado incident would get a rise out of Trump. He helped focus a spotlight on one of the more unsavory facets of his personality: an ugly, unrepentant sexism that would have been inappropriate even in the “Mad Men” era — and is light-years beyond the pale today.

Trump’s surrogates are not helping. Newt Gingrich offered the defense that “you’re not supposed to gain 60 pounds during the year that you’re Miss Universe.” For Trump and Gingrich, both of whom have ample spare tires where their waists should be, to criticize anyone about his or her weight is ridiculous. Better to point fingers at each other rather than at Machado.

The Clinton campaign is already running a powerful ad in which Trump’s voice utters a string of sexist comments while the viewer sees images of young women. Trump’s campaign manager, Kellyanne Conway, is a pollster; she knows that most voters are women, and that women already favor Clinton by a wide margin. This terrain is potentially lethal to Trump’s hopes, but no one has yet managed to zip his lip.

Trump’s threat to say something “extremely rough” was a reference to Bill Clinton’s infidelities. For a man who has had three wives, and who cheated on the first two, this is a case of the pot calling the kettle black.

The husband of the kettle, actually: I have a hard time believing that in this day and age, a man would actually try to blame a woman for her husband’s indiscretions. But that appears to be the cliff’s edge that Trump is hurtling toward.

Clinton, on the other hand, has the chance to make history. Not enough is being made of the obvious fact that she would be the first female president. Countries such as India, Argentina, Chile, Brazil and Liberia have all reached this milestone before the United States. It’s about time.

When you watched the debate Monday night, you saw a woman who was prepared, poised and perfectly unflappable. And you saw a man who was trying to wing it, with little grasp of the issues and less ability to control his impulses. He bluffed and blustered. He insisted on “facts” that were unfactual. He interrupted his opponent constantly, apparently not grasping the concept of waiting one’s turn. He substituted chest-thumping arrogance for actual substance.

I’m guessing that many women who will vote in November might know a man or two who act that way. Not good for Trump.

Read more from Eugene Robinson’s archive, follow him on Twitter or subscribe to his updates on Facebook. You can also join him Tuesdays at 1 p.m. for a live Q&A.