Let's take a moment to celebrate hypocrisy.

This would definitely be the moment to do so: House Republicans on Monday announced they are punishing Rep. Steve King (R-Iowa) for his racist remarks last week. "White nationalist, white supremacist, Western civilization — how did that language become offensive?" King asked in a New York Times interview. He later backtracked, but he couldn't contain the damage: GOP leaders said King will be stripped of all his committee assignments during this session of Congress.

"I watched what Steve King said," House Minority Leader Kevin McCarthy (R-Calif.) said, "and we took action."

But King has been making these kinds of comments for years: His belief in white supremacy has long been the most newsworthy thing about him — for crying out loud, he kept a Confederate flag on his desk, even though he represents a state that fought with the Union in the Civil War. It's only now, after he's been in Congress for 16 years, that King's colleagues have decided to act. McCarthy and other Republican leaders watched what King said — and watched and watched and watched — for more than a decade. Only then did they take action.

That's not good enough. It's too little too late. And punishing King does not mean the Republican Party has solved its problem of enabling and appealing to racists. Still, the GOP's punishing of King is a good thing.

There's an old saying that "hypocrisy is a tribute vice pays to virtue." Republicans are being huge hypocrites by punishing King now — especially with Donald Trump sitting in the Oval Office. As The Atlantic's Adam Serwer noted this week, it's nearly impossible to distinguish between King's views and Trump's views, particularly when it comes to immigration. But that hypocrisy serves a valuable public purpose: It reaffirms that racism is bad.

Unfortunately, we need that affirmation right now.

Society's consensus against racism — the idea that white supremacy is evil — is a relatively recent development in American history, and it is still a fragile consensus indeed. Children who came of age in the 1980s were almost universally taught to revere Martin Luther King Jr. as a hero, and that decade also saw the creation of a holiday celebrating his leadership. But Steve King, born in 1949, was a teenager by the time the Civil Rights Act and Voting Rights Act were passed by Congress in the 1960s. He grew up during an era when the basic civil rights of African Americans were treated as being literally up for debate.

Racism has never truly disappeared from politics. Its continuing existence and power has had real, harmful consequences. Republicans notoriously took advantage of racism's deeply rooted tendrils, launching their "Southern strategy" of appealing to whites who felt alienated and frightened of the new era. But as the new consensus against racism put down roots of its own, a major shift took place: Suddenly, appearing racist came with real costs — to reputation, and to livelihood. As a result, racist politicians, for the most part, had to start pretending they weren't racist. In fact, they often adopted the pose of anti-racism. Politicians couldn't use overt racial slurs in public anymore — they were likely to lose their careers for doing so. (Remember when former Mississippi Republican Sen. Trent Lott lost his job for praising old Dixiecrat Strom Thurmond?) Instead, as the late GOP strategist Lee Atwater once noted, they cloaked their agenda with talk of small government, states rights, crime, and other "more abstract" issues.

The consensus that racism is bad has wavered in the Trump era. The president has made his own beliefs clear with his policies on immigration, with "shithole country" asides, and with "good people on both sides" comments. David Duke, the former Klansman, has attained a new prominence, as has the white nationalist Richard Spencer. Society as a whole feels meaner and more dangerous as a result. King seemed to be thriving in this new era; the Times article that sparked his downfall noted he had been "emboldened" by Trump's ascendancy.

King may be less emboldened now that he has been defenestrated by his colleagues.

"Let us hope and pray earnestly that this action will lead to greater reflection and ultimately change on his part," McCarthy said in a statement Monday. Sure, that would be nice. Changing hearts is good. It's possible. Changing behaviors is pretty essential, too, and — importantly — bad behaviors can change even when the heart hasn't quite followed. That's why King's punishment is important, if belated. It might not change many racist hearts, but it reminds other racists in the House of Representatives — they surely exist, and not just within the GOP — that the line is still there, that there can be a price for crossing it, that they must at least pretend to hate racism if they hope to hold onto their careers. Hopefully the example being made of King will curb the public behavior of other politicians "emboldened" during this ugly era. That would be a fine outcome.