Editor's note: Errol Louis is the political anchor at NY1, where he hosts "Inside City Hall," a nightly political show.
(CNN) -- Anthony Weiner had every reason to believe he could survive the sexting scandal that ended his political career -- and with a little luck, he might have.
The New York One/Marist College poll of voters in Weiner's district found that 56% of them wanted him to remain in office, which Weiner -- who, at age 46, has spent nearly half his life as an elected official -- clearly wanted to do.
But the ex-congressman ran into a perfect storm of bad press, hostile colleagues, and a requirement that New York shrink its congressional delegation by two seats. He lied and stalled; he ducked, dodged and apologized, but nothing worked. His battle for political survival started to resemble what psychologists call the stages of grief: Denial, anger, bargaining -- and, finally, acceptance.
It could easily have played out differently. Men whose sins far exceed Weiner's are sitting in Congress today -- a fact that suggests it's too early to write off the idea of a return to politics by Weiner.
Back in 1982, Rep. Barney Frank of Massachusetts survived a scandal that featured more sleaze and deception than the Weiner affair. Frank not only hired a male prostitute, he moved the man into his home -- which his new roommate promptly turned into a base of operations for an ongoing gay escort service.
Frank's story -- that he'd been betrayed by a young man he was trying to reform -- held little sway with the public, although 61% of his constituents wanted him to run again. The Boston Globe, in a long, thoughtful editorial, demanded that Frank resign.
The congressman ignored his critics, weathered weeks of scathing attacks, and won re-election.
Fast-forward two decades. In 2007, Frank was a respected member of Congress, writing laws for the American banking system as chairman of the powerful Financial Services Committee.
Weiner served alongside other scandal-plagued politicians, including Sen. David Vitter (who admitted hiring hookers) and Rep. Charlie Rangel, the dean of the New York delegation whose censure for ethics violations did not prevent him from getting re-elected to his 21st term in Congress.
So Weiner had sound reason to believe he might be able to scrape by, wait for the dust to settle, and begin making plans to run for re-election. The thing he most needed was time -- enough time for a bigger, better scandal to bump him off the front pages of New York's scandal-hungry tabloids.
He didn't get it. Day after agonizing day of the slow summer news cycle produced no war, no terror attack or gruesome murder to drive Weiner from the headlines. So there he remained, festooned across the front pages and gossip pages in the nation's media capital, providing endless fodder for the monologues of late-night comedians.
To make matters worse, Weiner's congressional colleagues turned their backs on him -- in part because of an abrasive, media-hungry style that rankled politicians who considered him a show horse rather than a work horse. Political rivals quietly pointed out that, despite his frequent TV appearances, Weiner's dozen years in Congress yielded no signature legislation.
He didn't have many friends in Washington. Few members of Congress publicly stood up for him. By contrast, members from both sides of the aisle -- including the Democratic leadership -- publicly put in a good word for Rangel right up to the day he was censured.
Even in his home state delegation, where Weiner most needed allies, few were willing to speak up for him. New York is one of only two states (Ohio is the other) that must shrink its delegation by two seats. It's widely expected that Democratic and Republican party bosses will eliminate one heavily-GOP district in rural upstate New York and one seat in or near heavily Democratic New York City.
That made it easy for party elders to look at Weiner's demise as a convenient solution to a political problem. Rumor has it that new lines were being drawn -- with the 9th District eliminated -- days before Weiner resigned.
But don't rule out a return to politics by Anthony Weiner. Voters, it seems, are willing to give elected officials wide latitude when it comes to bad behavior, particularly in matters like sex that are considered personal.
My sense, from talking to several of Weiner's constituents, is that they saw his sexting of lewd photos to various women as kinky and distasteful, but unrelated to his ability to do his job.
Voters didn't elect Weiner to be perfect, or even to be a role model. They wanted solid constituent services and a representative to speak and vote in support of the issues they care about.
And that means it could be possible for an older, wiser Anthony Weiner -- a more amiable version of the brash young man -- to return to the public stage someday.
It's been known to happen. Just ask Barney Frank.
The opinions expressed in this commentary are solely those of Errol Louis.