Donald Trump, the Republican presidential nominee, walks away after a ribbon-cutting during the grand opening of the Trump International Hotel in Washington. (Andrew Harrer/Bloomberg News)

News reporters are supposed to keep their opinions out of the stories they write and air. Twitter, it seems, is another realm entirely.

With the political campaigns staggering into their final days, mainstream reporters otherwise obligated to objectivity — or at least a reasonably balanced, non-argumentative account of events — have taken to Twitter to unburden themselves of their apparently true feelings about the race.

The primary target of their derision and general snark: Donald Trump.

Trump was “really just asking for it with this venue,” tweeted New York Times political reporter Alex Burns the other day, when Trump gave a speech in Gettysburg, Pa. “Like a losing caucus candidate speaking in Waterloo, IA.”

Over news that Trump held a rally in Bucks County, Pa., outside Philadelphia, wherein Trump pledged to put “our miners back to work,” Burns commented, “Like going to Manhattan and pledging to defend sugar subsidies. Really great,” he tweeted.

Burns has had plenty of company in the dump-on-Trump arts. Michael Hirsh, national editor of Politico’s magazine, let fly after a colleague confessed his exhaustion with covering the Republican nominee. “The entire nation needs a vacation from a certain person. #LetItEnd,” Hirsh tweeted, apparently referring to Trump.

His Politico colleague Ben White offered his own one-word take on news that Trump had used donors’ money to buy copies of his book “Art of the Deal”: #scampaign,” he tweeted.

Editors have long tried to keep reporters’ opinions out of stories by excising them from unpublished copy. But social-media platforms such as Twitter and Facebook give scribes a direct and unfiltered publishing platform, enabling them to address thousands or even hundreds of thousands of followers without a meddlesome editor standing in the way.

Most news organizations have policies on what is permissible for their employees to post on Twitter and Facebook. The Washington Post, for example, advises its journalists to avoid profanity, partisan political opinions and overheated exchanges with readers, said Tracy Grant, deputy managing editor. The Associated Press instructs employees to “refrain from declaring their views on contentious public issues in any public forum.”

But the standards are often ignored and intermittently enforced, especially in the hurly-burly of a campaign featuring a candidate as polarizing as Trump. In the past three months, The Post, BuzzFeed and the New York Times have sent memos to their news employees reminding them about their guidelines. In his second memo on the subject in three months, the Times’s standards editor, Phil Corbett, wrote last month that “Times newsroom staffers should avoid editorializing, endorsing candidates or otherwise promoting their own political views” on social media.

That hasn’t stopped Times journalists such as Burns, who has more than 75,000 Twitter followers, from disgorging a steady stream of sarcasm, argumentation and second-guessing about Trump in recent weeks.

Trump on message so far, inasmuch as his message is ‘airing grievances about people who have wronged Donald Trump,’ ” Burns tweeted during the third presidential debate.

Burns, who declined to comment, has offered only a few such judgments about Hillary Clinton’s campaign tactics, speeches or behavior over the same time period. Asked for comment, a Times spokeswoman, Danielle Rhoades Ha, replied, “We don’t think the tweets you’ve cited reflect a partisan bias, and we are confident that our overall political coverage remains accurate and fair.”

Some journalists argue that the tweets aimed at Trump are warranted, given the unprecedented nature of his campaign. They point out that he has blacklisted news organizations, created a menacing atmosphere for the news media at his rallies, insulted dozens of reporters on Twitter, and advocated “opening up” the legal standards for libel so that he can prevail in lawsuits against reporters he dislikes. Hirsh, for example, replied via email that his tweet about needing a vacation from Trump was “pretty thin ­gruel” and suggested it was a joshing reference not to Trump but to a colleague.

On the other hand, Hirsh’s boss, Politico editor John Harris, thinks journalists should exercise more restraint. Without singling out anyone in particular, Harris said, “I think people pop off to excess and hurt themselves in the process.” He added, “I get upset by what I see. I don’t think there’s an editor who doesn’t feel that way.”

Politico’s co-founder and former chief executive, Jim VandeHei, offers a similar eye roll. “To me, sticking to facts and smart, fact-based analysis is the safe, smart place to be,” he said via email. “But snark seems to be winning — decisively.”

Some of Politico’s journalists can be as snarky as anyone on Twitter. White, the publication’s chief economics correspondent, seeds his Twitter feed with Trump barbs such as, “ ‘I don’t give my employees good health insurance’ is a really weird argument to make”; “Only Trump could screw up a layup of a campaign issue” (in reaction to Trump’s comments about Affordable Care Act rate hikes) and “All polls are phony [to Trump] unless he is ahead in them in which case they are the word of God.”

His colleague, chief political correspondent Glenn Thrush, has also offered tart Twitter commentary on many things Trump. Thrush live-tweeted the last debate, snarking, “Note to future presidential hopefuls: debate prep, maybe, matters a little” and “The problem for Trump: [Clinton] is better at being reasonable than he is.”

Thrush suggests that none of those tweets is “disputable.” He also said that he has offered both praise for Trump and criticism of Clinton in his missives. “I tweet a lot during debates, in part, because it provides the seed-corn for my takeaways,” he said by email, “and gives me real-time crowd-source feedback (positive and negative) that I find really valuable.”

He added: “That Trump is often the target of those barbs simply reflects the fact that his candidacy challenges the norms of American politics while seeking to undermine and delegitimize the good work of the well-intentioned men and women who cover him. I give Clinton plenty of scrutiny too.”

Thrush, indeed, may be mild in his Twitter treatment of Trump compared with other journalists. The conservative Daily Caller news site recently called out several BuzzFeed reporters and editors for their unrestrained contempt.

The site noted, for example, that, when the first Trump-Pence campaign logo was unveiled, BuzzFeed technology writer Charlie Warzel tweeted “lol to all of us tho for thinking that after a year of racist, vitriolic campaigning that trump gives two s---s about a logo.” And it pointed out that BuzzFeed’s world news editor and reporter, Hayes Brown, tweeted last month, “Donald Trump’s policy proposals are almost entirely made up of racism, tautologies, and racist tautologies.”

BuzzFeed editor Ben Smith declined to comment on individual tweets. Instead, he said, “We are proud of our tough, fair coverage on every platform.”

Smith issued a warning to his staff about proper social-media behavior in July after one of his reporters said she was so excited by President Obama’s speech at the Democratic convention that she “wet” herself.

Tim Graham, a self-described reluctant Trump supporter who is the director of media analysis at the conservative Media Research Center, isn’t buying that coverage is fair.

“It’s not difficult for people who feel the media is hopelessly biased against Trump to get all the evidence they need from Twitter feeds,” Graham said. “Every opinionated tweet further brands the media as a liberal blob.”