I’ve been surprised in recent days to see some prominent liberal commentators venture that maybe the Democrats should take such a deal. What’s $1.5 billion, goes the argument? That won’t build a wall. In exchange, the Dreamers are safe.

It’s tempting. But once Democrats agree to one payment of $1.5 billion, the door to many payments of $10 billion or $20 billion has been flung open. And — here’s the crucial point — they will have lost all ability to make a principled case against Mr. Trump’s wall.

I’m normally fairly comfortable with tactics and pragmatism, but this is one of those cases where that would constitute self-defeating politics. The Democrats need to be thinking about the midterm elections. Midterms are always “base” elections and referendums on the incumbent president. The Democrats should be heading into 2018 standing firm against the single most conspicuous symbol of Mr. Trump’s racial policies and attitudes, not cutting deals with him on it.

And this brings us to a brutal truth of our polarized time: Pundits don’t like obstruction. Experts at think tanks bemoan it. But voters rarely punish it.

In fact, they more often reward it. Look at how the Republicans fared in the two off-year elections during Barack Obama’s tenure. In 2010, they took six Senate seats and 63 House seats, recapturing control of that body. In 2014, they gained just 13 in the House — they’d about maxed out there — but picked up a whopping nine Senate seats.

These elections represented Republican voters rewarding their senators and representatives for saying no to President Obama on every major initiative. Democrats were outraged when the Senate Republican leader, Mitch McConnell, said in October 2010 that “the single most important thing we want to achieve is for President Obama to be a one-term president.” But not Republican voters. Two weeks after he said it, they gave Mr. McConnell six new Republican Senate colleagues to work with to try to accomplish that goal.