Four days before memos written by former FBI director James B. Comey leaked to the press, President Trump tweeted that the documents are “phony” and “FAKE!

Yet after the memos became public on Thursday night, Trump held them up as proof that “there was NO COLLUSION and NO OBSTRUCTION.”

Trump mischaracterized the memos, which, in fact, present no conclusions about whether he obstructed justice or headed a political campaign that coordinated with Russia during the 2016 election.

But what is notable, besides the president’s factual errors, is that he cited Comey as a credible source. Though he had previously wanted the memos discounted, Trump suddenly reversed and wanted the documents seen as authoritative.

The reason for the change is obvious: When Trump expected the memos to be all bad for him, they were “phony.” And when he saw the memos as an opportunity to profess his innocence, they were reliable. As he often does, Trump measured truth by a single standard: favorability.

Trump has called Comey a liar yet also has reveled in Comey’s remarks about former attorney general Loretta E. Lynch and former FBI deputy director Andrew McCabe, gleefully tweeting that Comey threw both “under the bus.”

Trump seems happy to accept Comey’s criticism, in the new book “A Higher Loyalty,” of Lynch’s “tortured half-out, half-in approach” to the Hillary Clinton email investigation. And Trump appeared to enjoy Comey’s Thursday interview on CNN — or at least the part in which Comey responded to news of a criminal referral against McCabe.

“That’s part of accountability,” Comey said, “an examination of what the consequences should be if there was material lying.”

Judging a person’s credibility is not an all-or-nothing proposition. Comey could, in theory, tell the truth about some things and lie about others.

But Trump's selection of what to believe and disbelieve appears to be purely self-serving, rather than evidence-based. When Comey writes or says something that Trump likes, the president credulously spreads it to his 51 million Twitter followers. And when Comey writes or says something Trump dislikes, the president calls the former top cop an “untruthful slime ball.”