Democrats like to tell themselves a comforting story.

Democrats are pragmatists, if they do say so themselves, deeply rooted in the reality-based community, beholden to facts, toiling valiantly and soberly to make the country a better, fairer place. Republicans, meanwhile, are ideologues monomaniacally fixated on cutting government spending and taxes for the wealthy, regardless of the consequences, and moving inexorably further and further to the extreme right.

However, if a recent Pew poll is to be believed, this story is nothing but a self-justifying myth. Yes, many Republicans are ideological, and the party has indeed been moving to the right in recent years. But the truth is that Democrats have simultaneously been moving to the left — and doing so with greater unity and, on some issues, more rapidly than Republicans have been moving right.

The increase in partisan polarization is an old story. In the middle decades of the 20th century, America's two major parties were ideologically incoherent, with considerable overlap in the center. Today things are dramatically different. Now 95 percent of Republicans are more ideologically conservative than the median Democrat, and 97 percent of Democrats are more ideologically liberal than the median Republican.

What's new in Pew's poll are the changes in public opinion over time across a range of issues. Not only are Democrats and Republicans further apart than ever (or at least since tracking began, in 1994) on such issues as government regulation of business, benefits to the poor, the fairness of corporate profits, the role of racism in American society, immigration, and environmental regulations, but in most cases the growing gap is more a result of a shift in public opinion among Democrats than it is a product of changes among Republicans.

In some cases (on race and immigration) the biggest shift has come in the past few years, which points to a rebound effect in reaction to Donald Trump's campaign and his presidency. But on most of the issues, the gap has been widening for a much longer time, pointing to a broader trend toward the ideological left among Democrats.

The contemporary Republican Party is less ideologically coherent than the Democratic Party. In addition to the findings of the Pew poll, the Voter Study Group report on the 2016 election from this past June makes clear that there is considerable diversity among those who voted for President Trump when it comes to the economic dimension of public policy. Yes, a substantial portion of such voters remain wedded to the Republican Party's post-Reagan agenda of pushing cuts to taxes, spending, and regulation, but another large segment of the party could more accurately be described as populists — with the populism having economic as well as cultural/identity dimensions. (On the social/identity axis, which includes such moral issues as abortion and same-sex marriage, as well as attitudes toward African Americans, immigrants, and Muslims, Republicans come down firmly on the "conservative" side.)

Hillary Clinton voters, by contrast, are highly likely to be both very liberal on economics and very liberal on questions of culture and identity. This coherence is captured in graphs based on the Pew data from 2017 showing the "blue" Democratic bell curve as narrower and taller (more agreement within the party) than the "red" Republican bell curve, which appears shorter and broader (somewhat less agreement within the party).

The upshot is that the Democratic Party as a whole has been moving to the left for quite a while, with the shift on some issues (race, immigration) accelerating rapidly over the past two years in response to the myriad provocations of Donald Trump.

What do these changes portend electorally for the future of the Democrats? How will a more coherent and unambiguously left-wing party fare in head-to-head competition with a more sharply divided Republican Party that has an increasingly extreme and highly mobilized right-wing fringe?

There's no way to know for sure. But what we can know is that Democrats will be much better off if they take a good honest look at themselves, drop their pretenses to fact-based pragmatism, and accept that they're not passive observers of the polarization that's gripped our political culture in recent years.

When it comes to identifying the origin of this troubling phenomenon, there's plenty of blame to go around.