Cynical politics: Chris Quinn, here at a previous City Council rally on the Zimmerman case, used corrosive rhetoric about Saturday’s verdict. Photo: William Farrington

Reacting to the Trayvon Martin verdict, President Obama was kind of classy — but the New York City mayoral munchkins, not so much.

“We are a nation of laws,” said the president over the weekend, “and a jury has spoken. I now ask every American to respect the call for calm reflection from two parents who lost their young son.”

Wise words. Sound counsel.

Sure, Obama gave the racial resentment pot a mighty stir shortly after the fight that left Martin — who was black — dead and George Zimmerman — a Hispanic deemed “white” in the media narrative — charged with murder.

“If I had a son, he’d look like Trayvon,” said our president, unhelpfully. But he had re-election to win, and an electorate to energize — and a politician’s gotta do what a politician’s gotta do.

The same instinct clearly was at work in New York Saturday night: When the Florida jury deemed Zimmerman not guilty of the crimes charged, a wash of corrosive rhetoric poured from the city’s mayoral aspirants.

To wit:

* “Trayvon Martin was killed because he was black. There was no justice done today in Florida,” said William Thompson, who is himself African-American — and who also knows better, as we shall see.

* City Council Speaker Christine Quinn (D-Manhattan) termed the verdict “a shocking insult” — adding, nonsensically, “We must also put an end to a culture that presumes any young man of color . . . is looking to commit a crime simply because he was walking down the street.”

* And Anthony Weiner broadcast a decidedly contradictory message, finding the verdict “deeply unsatisfying,” but noting “trial by jury is our only choice in a democracy.”

There was more, but it amounted to nothing — except for Republican John Catsimatidis’ absolutely spot-on observation: “When you have safe streets, tragedies like this don’t happen.”

Without fully rehashing the Martin-Zimmerman case, it should be noted that the Sanford, Fla., police department isn’t very efficient; burglaries there were both rampant and largely a black enterprise; a neighborhood watch was formed — and presently the fatal encounter occurred.

But Zimmerman, the jury found, was acting within the law right up to the conclusion of the fight; Martin, essentially, was the victim of cruel circumstance — and of Florida burglars unnamed.

Yet to extend Catsimatidis’ thought, when you have safe streets people accept them as a fact of life — and there’s scant appreciation of the need to keep them safe.

In New York City, that debate revolves around the NYPD’s use of so-called “stop-and-frisk” — essentially an aggressive police presence in high-crime neighborhoods.

It’s been an astonishingly successful approach: Cops look for violent criminals where violent crime occurs, one result being that New York is the safest big city in America.

But it’s also controversial: A lot of people resent what they term the stigmatizing attention it brings to certain precincts — and so it has become a major pander point in the mayoral campaign.

Interestingly, Thompson seems to get it.

“I’m the one who has to worry about my son being stopped and frisked,” he said earlier this year. “But I’m worried also about my son being shot by someone who’s a member of a gang in the street.”

And worried he should be.

Some 97 percent of the city’s shooters last year were black or Hispanic, according to the NYPD — as were fully 96 percent of its shooting victims.

Such numbers — indeed, street-crime stats right across the board — speak loudly to social dislocations that run deep in the city. The same pathologies — not to put too fine a point on it — threaten not only public safety, but also the stability of the city’s public schools, among other things.

And the fact that none of this is even a small part of the 2013 mayoral discussion is profoundly disturbing. Alas, it’s much easier to sacrifice yet another generation to false pride and cheap electoral opportunism.

Certainly, the candidates had an opportunity Saturday night. They all spoke nonsense, save for John Catsimatidis — who has no chance of becoming mayor.