Idealism in politics gets too much good press.

When it informs political rhetoric, elevating the pursuit of power and giving it moral shape, idealism has its place. But too often it becomes indistinguishable from magical thinking — from the empirically unfalsifiable conviction that what one's ideological compatriots hope to achieve is so self-evidently wonderful, so obviously pure, so transparently righteous that it is bound to prevail.

Witness the now-defunct presidential campaign of Vermont Sen. Bernie Sanders.

I can understand some of Sanders' appeal. For a politician with presidential ambitions, he was refreshingly honest. And he highlighted some of the very real injustices and cruelties of the distinctly Darwinian form of capitalism that prevails in the United States. This enabled him to tap into high levels of discontent among young voters.

But Sanders also campaigned for the presidency in a way that showed an almost absurd disregard for the realities of small-d democratic politics. To win elections, politicians need to build broad coalitions. They need to reach out to voters who don't immediately and instinctually respond to the purest form of their message. As an experienced pol, Sanders obviously knows this. His long-term record on guns and other issues shows that he was quite willing to make moderate moves in his mostly rural home state. But he apparently decided that he wanted to run for president as a prototypical leftist preaching a gospel of political revolution instead.

That made Sanders a quintessential idealist who bought into magical thinking. No wonder it didn't work out for him.

Part of the problem, I suspect, is that he believed his surprisingly impressive showing in 2016 was a function of the widespread appeal of his (in an American context) radical message rather than what it almost certainly was: a combination of genuine enthusiasm among the young and broad-based dislike for Hillary Clinton. Without Clinton as an opponent and foil, Sanders proved incapable of performing the same magic trick again, let alone building on it.

This was obscured for a time by his campaign's continued strength at organizing caucuses (in Iowa and Nevada) and by a field that was deeply divided during the opening weeks of the primaries. If that division continued, there was a small chance that Sanders could have reproduced Donald Trump's 2016 inside straight and eeked out a plurality victory in the race for delegates. But as soon as the competition dropped out, that path became impossible. In the end, Sanders won fewer states this time around (9) than Rick Santorum did in the GOP primaries eight years ago (11).

Which is pretty much what one would expect from a man who insisted on referring to himself as a socialist, despite polling that consistently showed the unpopularity of the term. And who loved to point to different polls that showed strong support for Medicare-for-all, while dismissing many others that revealed serious apprehensions about it when its painful corollaries (like the abolition of private insurance and a gargantuan price tag) were presented to respondents.

Go right on down the line of the campaign's policy positions and the candidate's revolutionary rhetoric on the stump and in debates: At no point was there the slightest sign of an inclination toward moderation, compromise, or conciliation; no acknowledgement of a need for trade-offs or adjustment of expectations in the face of economic or fiscal limits; no sense that Sanders understood that lots of people besides his billionaire betes noires prefer something between socialism and the cartoonishly pro-business approach of present-day Republicans; or that many millions of Americans both deeply dislike the current president and yet have no desire to see $60 trillion in new government spending.

None of that seemed to matter to Sanders. He and his supporters wanted what they wanted, and they had faith that if he promised it over and over again without variation, the voters would respond and the candidate would prevail — in the primaries, and then against Trump in the general, and apparently even in the Senate, where of course a socialist president would be incapable of getting even the first piece of his revolutionary program passed without a 60+ majority of left-progressives.

Possible? I suppose it could have happened. Just as it was possible that the primary challenge to Trump by former Massachusetts Gov. William Weld might have taken down the sitting president. It was just exceedingly unlikely. Sanders did much better than Weld at the first part of the electoral triathlon he set for himself. But winning the presidency while sweeping a supermajority of wannabe socialists into both houses of Congress along with him? You've got to be kidding.

This is the fantasy of the true believer who allows himself to forget the political rules — or who assumes he's simply so superhuman that he possesses the power to suspend those rules with his convictions and self-evidently appealing message. Building a broad-based coalition? Setting priorities? Reaching out to segments of the electorate who didn't start out swooning for the candidate? Acting like a retail politician, selling a message to voters, meeting them part way, working to get them to buy in? All of that is beneath the One True Thing and the activists sitting at his feet. (In this respect, the campaign of Massachusetts Sen. Elizabeth Warren was little better. Aside from claiming the capitalist mantel for herself, she resisted drawing policy contrasts with Sanders, appeared to match his radicalism with her hundred-and-one plans for dramatic reform, and actually tried on numerous occasions to outflank him on his left on issues wrapped up with identity politics. All told, Warren proved just as incapable of telegraphing a message of moderation as Sanders.)

A socialist may recoil at the language of marketing and advertising, of buying and selling, but that's the way democratic elections work. Sanders himself never indicated even the slightest inclination toward seeking to gain power through any other means. (Only in his peculiar hesitation to criticize the despotic regimes of self-proclaimed socialists around the globe has he shown any sign of wavering in his support for democracy.) Yet there is a reason that left-wing political movements have so often taken the path of political violence and dictatorship. Absolutism, certainty, and a sense of self-righteousness, along with a distaste for the tawdry and transactional character of retail politics, have tempted many to consider themselves a vanguard entitled to dispense with democratic niceties.

This wasn't Bernie Sanders' way, but neither was the path of pragmatism. That left purity in defeat as the only remaining option. Here's to hoping the leaders to follow him on the left prove as decent — or more willing to play the democratic game to win.