Former President Barack Obama at the White House Correspondents’ Association dinner in 2016. (Photo: Yuri Gripas/Reuters)

There are jokes that even the most powerful man in the world can’t tell in public.

That’s one of the lessons we learn in “Thanks, Obama: My Hopey, Changey White House Years,” a memoir by David Litt, who was just 24 when he started writing speeches for the former president.

In one West Wing writing session, Litt recalled in an interview with Yahoo News, he came up with a gag that played off Vice President Biden’s remark that Obama had a “big stick” and related it to the president’s memoir “Dreams From My Father.”

Biden “was talking foreign policy, but made a hand gesture that did not look like a foreign policy hand gesture. And so the joke was, the punchline was, ‘Well, let’s just put it this way: Dreams aren’t the only thing I got from my father,’” Litt said in an appearance on the Yahoo News show on SiriusXM POTUS Channel 124.

“There was no question that that joke was not going to go in the speech, but it was just this moment of like, ‘This is really good, how many chances are you going to get to tell a joke like that to the president of the United States?’ So we ran that one by him,” he told Yahoo News.

Former Obama speechwriter David Litt at a storytelling event in New York City earlier this year. (Photo: Ben Gabbe/Getty Images for The Moth)

There were other, less risqué jokes that also did not make the cut.

“I remember trying to get a joke in there about legalized marijuana, or decriminalized marijuana, in D.C. and Rand Paul and a 13-hour filibuster on the subject of whether or not the Taco Bell was still open,” Litt said. “I really liked that joke, but the president — there were too many moving parts.”

“And one of the things that we felt pretty strongly about was if President Obama didn’t personally respond to a joke, we weren’t going to be there trying to sell him on it,” he explained.

Asked what his favorite Obama joke was, Litt cited a line from the 2013 White House Correspondents’ Dinner. “He told a joke where he said, and I’m paraphrasing, ‘One thing Republicans all agree on is they need to do a better job reaching out to minorities. Call me self-centered, but I can think of one minority they could start with,’” Litt said. And the president added, “Think of me as a trial run.”

Story continues

(Litt’s memory is pretty solid. Here’s what Obama said, according to the transcript of that speech: “I know Republicans are still sorting out what happened in 2012, but one thing they all agree on is they need to do a better job reaching out to minorities. And look, call me self-centered, but I can think of one minority they could start with. [Laughter.] Hello? Think of me as a trial run, you know? [Laughter.] See how it goes. [Laughter]”)

At times, Litt worried about Obama’s delivery, thinking that the president “would come across as kind of a dick” — notably in his appearance on the online parody show “Between Two Ferns” in an effort to promote Obamacare enrollment to young Americans.

“One of the things I was worried about is that ‘Between Two Ferns’ sort of operates on this idea that Zach Galifianakis, the host, is schlubby and lovable, but kind of weird, and the guest is putting him in his place,” said Litt, now the head D.C. writer for the company that produces the show “Funny or Die.”

“And the problem is, if you’re the president, there’s always a power imbalance,” Litt told Yahoo News. “When we would tell jokes about [Senate Republican leader] Mitch McConnell, that was less of an issue, because he’s doing fine.” But on “Funny or Die,” “I was worried that It might look like President Obama was beating up on this guy who is, you know, not the president, I mean very obviously not the president.”

Litt’s book also includes an unpleasant encounter with disgraced Miramax film mogul Harvey Weinstein, fired amid a growing chorus of women accusing him of sexual harassment, assault and even rape. Litt writes that Weinstein berated him over the phone, and quips that “being hectored by Harvey Weinstein was like getting punched in the face by Muhammad Ali.”

The incident occurred at the 2012 Democratic convention in Charlotte, N.C., where it fell to Litt to help Hollywood stars Scarlett Johansson and Kerry Washington draft their speeches to the assembled delegates.

“This was, at least I was told, a sort of Harvey Weinstein production,” conceived by the producer as a rebuttal to Clint Eastwood’s memorable speech to the Republican convention, in which he harangued an empty chair, Litt said. It did not go well, at least initially.

“Suffice to say that Harvey Weinstein was not happy about the way I was handling things,” Litt said. “I got called up and yelled at a few times by him.”

In the book, Litt recalls the tirades as a “strange but harmless experience.” But “obviously this week and last week, it’s one of those things, looking back on it, that it suddenly feels a little less insignificant,” he told Yahoo News. “Although, you know, the allegations that came to light are several orders of magnitude more horrifying than anything that I, you know, sort of sat through on the other end of a phone in a coffee shop in Charlotte.”

Read more from Yahoo News: