No one can be a good legislator unless he is willing to give up the job.

If hanging on to that seat in Sacramento or Washington, D.C., — or on any city council or county board in the state, for that matter — is the focus of a political career, that officeholder is a hack, not a legislator.

Unless a legislator is willing to take a stand on what she believes is best for the state or the country, regardless of how it plays at home in the district, she’s not doing the job she’s paid to do.

There are plenty of legislators who don’t see it that way, of course. Take, for instance, Rep. Thomas Massie, a Kentucky Republican explaining in the Washington Post this week why he’s willing to shut down the government in an effort the kill the Affordable Care Act, aka Obamacare.

“All that really matters is what my district wants,” he said. “And my district is overwhelmingly in favor of my position.”

Now it’s likely that Massie, who was elected last November with support from Tea Party groups, the Club for Growth, Gun Owners of America and both Rand and Ron Paul, would never vote for the president’s health plan, regardless of where his heavily Republican district stands. But that doesn’t make his remark any less ridiculous.

If the only thing that ever matters to Massie is what his district thinks, where does that end? If the Boone and Lewis county voters support an end to the two-party system, does Massie go along? What about mandatory prayer in public schools, regardless of how the Supreme Court has ruled? Or what those voters decided that all electricity should be generated from good old Kentucky coal, rather than those new-fangled solar panels Massie has on his home, letting him live off the power grid.

More to the point, why have legislators at all if every vote becomes a simple show of hands back in the district?

This isn’t to pile on any one legislator. Massie’s sentiments — although probably not his actual words — are held by a lot of politicians across the country, many of them scared to death that if they even think about crossing their voters, they’d be looking for a new job come the next election.

But legislators, both in Washington, D.C., and in Sacramento, take an oath to “support and defend the Constitution of the United States,” not to protect the interests of the voters in Kentucky’s Fourth Congressional District or California’s Fourth Assembly or State Senate districts. And there’s certainly nothing in that oath about only doing what’s best for your party and what’s worst for the other party.

Although you could argue that politicians apparently have found a secret partisan codicil in that oath that calls for D.C. Republicans to oppose anything President Obama suggests, much as California Democrats were determined to torpedo any program former Gov. Arnold Schwarzenegger would propose (See: Fresh fruit for poor school kids, 2005).

Voters don’t elect someone to be a ventriloquist’s dummy, much as they’d like that sometimes. While they typically vote for the person they’re convinced will best represent their own specific interests, they also are voting for someone they believe is smart enough and thoughtful enough and principled enough to make what he or she believes are the best decisions for the state or the country.

And sometimes, if someone is in office long enough, there will come a time when what’s best for the state or the country isn’t what’s best or most popular for the district. That’s when a politician has to decide what he’s willing to do to hold on to his job.

It’s the decision: legislator or hack.

John Wildermuth is a longtime writer on California politics.