In Beijing, it was much the same. During the campaign, Trump said China is “ripping us like you’ve never seen” and “we can’t continue to allow China to rape our country.” But once actually in China, Trump blamed all this not on China’s government but on his incompetent American predecessors. While citing the “unfair trade practices that drive” a “shockingly” large trade deficit, Trump insisted, “I don’t blame China. After all, who can blame a country for being able to take advantage of another country for the benefit of its citizens?” To the contrary, he said—as the Chinese crowd applauded—“I give China great credit.”

All this fits a pattern. Again and again on the campaign trail, Trump insulted undocumented Mexican immigrants and promised to remove them from the country. But in August of last year, when he finally sat down with his Hispanic advisory council, media reports called him “humble” and “conciliatory.” Rather than reiterate his pledge to round up the undocumented, Trump—according to one participant—said “deporting them is neither possible nor humane.”

Not long after that, Trump met President Enrique Peña Nieto in Mexico City. Instead of discussing his signature campaign proposal—a wall across America’s southern border paid for by Mexico—Trump’s advisers insisted beforehand that neither side raise the subject. And when Peña Nieto did anyway, Trump advisor Rudy Giuliani reportedly insisted that the subject was “off the table.”

At his press conference in Mexico City, Trump called his meeting with Peña Nieto a “great, great honor” and said he had “tremendous feelings” for the “tremendous” Mexican-American people—the same people he had earlier labeled rapists.

Then Trump flew to a rally in Arizona, where, according to The Washington Post, he abandoned his “subdued and cooperative tone” and “returned to the aggressive tenor that has defined much of his campaign.” Speaking to an overwhelmingly white crowd, Trump bellowed, “Anyone who has entered the United States illegally is subject to deportation.”

Trump’s interactions with African Americans have been similar. In front of mostly white audiences, Trump during the campaign accused Black Lives Matter of encouraging attacks on police and suggested that African Americans were prone to voter fraud. But in September, when Trump addressed a mostly black church in Detroit, he didn’t repeat any of that. To the contrary, he called black churches “the conscience of our country” and praised them for moving America “toward a better moral character, a deeper concern for mankind, and spirit of charity and unity that binds us all together.” In a report on the trip, The Washington Post noted—you guessed it—Trump’s “jarring shift in tone and message.”

Most politicians shift their tone depending on their audience. It’s human nature, especially for people trying to win votes. Trump’s gyrations, however, are particularly extreme.