President Obama makes for a bad straight man.

He was a complete bore on “The Daily Show” with Jon Stewart, as he pontificated on how great his administration’s accomplishments have been and how he knew all along that this was going to be a tough election for Democrats.

Mr. Obama’s appearance on “The Daily Show” reminds one of John McCainJohn Sidney McCainOvernight Defense: Pompeo lays out new Iran terms | Pentagon hints at more aggressive posture against Iran | House, Senate move on defense bill Senate GOP urges Trump administration to work closely with Congress on NAFTA Sarah Sanders: ‘Democrats are losing their war against women in the Trump administration’ MORE’s appearance on “Saturday Night Live” the weekend before the presidential election two years ago. Except McCain was very funny.

Barack ObamaBarack Hussein ObamaHolder: DOJ, FBI should reject Trump's requests The Hill's 12:30 Report — Sponsored by Delta Air Lines — Frenzy over Kennedy retirement rumors | Trump challenges DOJ Asian American and Pacific Islander community will be critical to ensuring successful 2018 elections for Democrats MORE is not funny. Or at least he wasn’t in the time that I saw him on Stewart’s show. After about 10 minutes, I had to turn the show off. BORING!

It is an open question whether the president’s appearance was crossing a line, mixing the worlds of comedy and politics.

Stewart’s show is usually pretty funny. He skewers the right (because he is a man of the left), but he skewers liberal politicians too.

The reason? Because politicians make great targets for humor.

Court jesters were the first comics to make fun of the political class. And they were the only ones who could get away with making a meal out of the royal class.

Will Rogers was one of America’s first humorists to take on politicians, although, as he put it: “I don't make jokes. I just watch the government and report the facts."

Johnny Carson fine-tuned the art of making fun of politicians in his nightly monologues, and it is the Carson model that largely inspires Jay Leno and David Letterman today.

Barack Obama wasn’t the first president to appear on a comedy show in person.

Richard Nixon memorably made a cameo on “Laugh-In,” the risqué, counter-cultural, drug-addled comedy show. Nixon’s appearance, though, was very funny, and very brief. He looked into the camera and said, “Sock it to me,” in such a way as to communicate that he got the joke.

Nixon’s “Sock it to me” moment was hilarious. Obama’s appearances on “The Daily Show,” “The Tonight Show” and “Late Night With David Letterman” have not been that funny.

Instead of getting a president who is willing to be a straight man and poke fun at himself, we have been getting more lectures from the guy who wants people to know that he is the smartest guy in the room. Boring.

Obviously, Mr. Obama is trying to score points with so-called young voters who apparently get their political information from Comedy Central.

But the president doesn’t seem to understand that young people watch “The Daily Show” (as do a lot of older people) because they want to be entertained. They want to laugh. They don’t really want to be lectured to, especially by a guy who is doing his best to pile more debt on their backs.

The Washington Post has an interesting op-ed by Alexandra Petra, “A Like-In For Generation I.” In it she writes about the millennials’ love of irony: “Call us Generation I. I for irony, iPhones and Internet. I for instant gratification. I for idiosyncratic, inventive, impertinent. We’re all of these things, [as] are our idols — The Onion, “The Colbert Report,” “The Daily Show.” That is why we’re pouring onto the Mall on Saturday to celebrate the restoration of all things sane, sarcastic and Stewart. … [S]um up our lives in a phrase? The importance of Never Being Too Earnest.”

President Obama makes a lousy straight man. He also makes a lousy comedian.

He should stick to doing his job and leave the humor to the politicians.