It's the writer's favourite consolation: Everything is copy.

So Noah Richler may have been muttering to himself after the past federal election. He ran for the NDP in Toronto-St. Paul's, a Liberal lock, and lost badly to the incumbent Carolyn Bennett.

Now he has salvaged a book from the wreckage, titled The Candidate: Fear and Loathing On the Campaign Trail – a jaunty, well-written manual for how to fail in politics.

Story continues below advertisement

First step: run for office. It's a mistake that most people never make. But Mr. Richler jumped into the electoral arena with both feet, and only a little crookedly.

A political essayist and author like his acclaimed late father, Mordecai, he was parachuted (gently, since he only lived across town) into Toronto-St. Paul's, a strange amalgam of Little Jamaica poverty and gaudy Forest Hill wealth. It was a seat that Dr. Bennett had held since 1997, where the former family doctor had reputedly delivered about half the riding's babies, and where the NDP tended to finish third.

Undaunted, Mr. Richler drew on his history of playing the "righteous underdog" and got to work. He insists that his candidacy wasn't conceived as book fodder – he really wanted to win, so "fed up" was he with the Harper Conservatives.

As if to prove the point, he has penned extended passages of playfully vindictive wish fulfilment about life on Parliament Hill under an imaginary NDP government. "I looked up from the floor and saw that Carolyn Bennett, now a consultant with Turtle Island Fracking, was taking notes in the Gallery and looking especially sour, lips tightly pursed," he writes. "Even from this distance I could see she was gripping her eagle feather quill so tightly that she was fraying the barbs. I waved."

Story continues below advertisement

In retrospect, the likelihood of a Richler victory was small. His Eeyorish countenance (photoshopped in campaign material to make him look happier, we learn) was always going to be a hard sell on the stump. Nor did his biography or personality help much: former heroin user, fond of a drink, uneven work ethic, little history of partisan commitment, Facebook and Factiva pages chockablock with offensive writerly candour.

Little surprise, perhaps, that he was not always a dynamo on the hustings. "Elections are made of tedious work," Mr. Richler concluded after his first experience volunteering for a politician in the mid-1970s, an assessment that seems not to have changed.

Still, Mr. Richler paints a warm picture of his shambolic campaign, lingering over details like the bicycle parked in one of his office's bathroom stalls and the never-quite-explained concept of "funky town halls."

When he lets himself fantasize about strapping a speaker to the roof of a car and blaring Italian campaign slogans along the local thoroughfares, he has reached the apotheosis of his approach to politics: whimsical, idealistic and cartoonishly impractical.

Story continues below advertisement

Mr. Richler, 56, has written the political equivalent of George Plimpton's participatory sports journalism, where the blue-blood man of letters quarterbacked for the Detroit Lions, minded net for the Boston Bruins and otherwise waded out of his depth among the thick-necked and toothless, all while playing the role of charmingly baffled amateur.

The task of maintaining order amidst Mr. Richler's grand adventure was often left to campaign workers with names Liz and Young Ethan, who are cast in the role of stern Jeeves to his bumbling Bertie Wooster. When one of his campaign managers informs him that a Toronto Sun reporter has called with a newly unearthed gaffe, "she is speaking softly, like she is a doctor and I am the patient."

Where Mr. Richler thrived – or at least enjoyed himself best – was in mixing with the colourful constituents of his riding. We read about the musty smell of apartment corridors in August ("cabbage on the top floors, bleach in the basements"), the Portuguese-speaking grandfather wearing a black apron for a shirt, the Chinese-Canadian woman who puts in her false teeth when Mr. Richler visits. The candidate seems to relish it all, even when he's greeted with "quivering lips" and slammed front doors.

The literary flair that make these passages so vivid could be a gift on the campaign trail, but was more often a curse. His writer's instincts are thwarted at every turn; healthy, crunchy English words are forever being replaced in his mouth with mealy euphemism.

Story continues below advertisement

Initially, he is unimpressed by the NDP "message guide" – not a script, his handlers assure him, but a series of talking points that have been "incredibly tested over and over again through focus groups." He becomes a hero for a moment with his appalled, mocking response to the handbook. "This was it?" he exclaims.

Finally, though, even the compulsively candid Mr. Richler learns to toe the party line. In one bracing section, he lists things he said during the campaign that he "did not altogether believe": that Canada was in a recession, that the country should end its role in fighting the Islamic State and that full postal service should be restored.

It wasn't enough, of course. The gaffes piled up, and Mr. Richler finished third with 14.7 per cent of the vote, more than 40 points behind Dr. Bennett. More stylist than politico, he is excellent on the dismal atmospherics of losing. At a meal for beaten NDP candidates, he notes that the group "appeared gormless, awkward and without the right stuff." Mr. Richler is among them.

Perhaps he should have listened to his wife, Sarah, who, even before the campaign, "truly believed Noah was more effective writing about politics than participating in the game."

Even so, with a book's worth of copy now in hand, Mr. Richler sounds sanguine about the experience. "It was one of the best things I ever did," he said, sitting in his publisher's office this week. "It was lots of fun. Loved it."

Story continues below advertisement

So will he run again? The Candidate ends, cheekily, with this cliffhanger question. A year on, he dismisses the idea. "It's too hard on the people around me," he insists. And anyway, "If I were to run again, I could never do it with that marvellous innocence."

Anyway, he allows, whether innocent or jaded, he's not sure his old party would have him back. "I worry that the NDP will say, 'No writers any more.'"