When President Reagan was governor of California, the leader of the Democratic majority in the legislature was fond of saying that his "bark was worse than his bite."

It was Assembly Speaker Bob Moretti's way of observing that Reagan, despite the ideological purity of his campaign rhetoric, was a practical politician who would take what he could get.

Time and again, in the eight years of his governorship and his first two as president, Reagan and his staff demonstrated they understood that half a loaf was better than none.

Reagan showed a similar proclivity for tough talk and pragmatic compromise in the lame-duck session of Congress, which White House officials yesterday acknowledged was only a limited success.

One official used an old joke to describe the results of the session, saying "How's my spouse, compared to what?"

His point was that Reagan achieved results in the lame-duck session, particularly in winning approval of a record peacetime defense budget, that may be difficult to obtain from the new Congress, with its enlarged Democratic House majority in 1983.

Responding to those congressional Republicans who thought Reagan should not have called Congress back, another administration official said:

"We don't think the lame-duck session was a mistake. Not that we got everything we wanted, which we did not, or that we wanted everything we did get. But the same issues would have come up in January with a more difficult Congress, and we probably would have ended up with a worse result."

This viewpoint was echoed by a senior Republican congressional aide, who nonetheless saw the session as a portent of struggles to come.

"There's a real fear, a legitimate deep fear of what will happen if we have 10 percent unemployment a year from now," the aide said. "The lame duck was a glimpse of the future."

But Reagan is not taking counsel of his fears. The president was described by aides yesterday as being typically optimistic, stressing his successes in his private conversations, as he did in a public statement Tuesday, and minimizing his defeats.

The president apparently still believes, as he indicated in an interview with The Washington Post last week, that Congress eventually will approve funding for the MX missile. Though there are members of the White House staff who are not so optimistic, the president apparently believes it will be difficult for the next Congress to resist a recommendation from an advisory committee composed of defense secretaries from the past three administrations.

Yesterday, Reagan was functioning as a practical politician again in the waning hours of the legislative session, telephoning Republican senators in an effort to win approval of the 5-cent increase in the gasoline tax.

According to a White House official, Reagan also indicated that he was "very much displeased" with the performance of Sen. Jesse Helms (R-N.C.), because of his opposition to the gasoline tax and because his filibuster contributed to blocking of key elements of the administration's Caribbean Basin initiative after an unexpected victory in the House.

Reagan, no fan of Helms, reportedly observed that the North Carolina senator had "burned his bridges" with some fellow Republican conservatives.

Administration officials do not see the filibuster as an augury of trouble on the right.

They point out that a filibuster of the type waged by Helms and Sen. John P. East (R-N.C.) poses far more of a threat in an abbreviated session just before Christmas than in a regular session.

Reagan's willingness to take less than he asked for and to redefine limited success as glorious victory is rooted in the experience of the past.

Some who have known him for a long time trace his pragmatic behavior in office back to the days when he was president of the Screen Actors Guild, negotiating contracts with producers.

Reagan, a liberal Democrat when he began this experience, learned the standard labor negotiating tactic of taking a hard line while simultaneously exploring to see what the other side would accept.

When he reached Sacramento in 1967, he promptly announced that he was cutting the budget by 10 percent across the board.

When the legislature refused to accept this budget as unworkable, he submitted a new one and agreed to a massive tax increase opposed chiefly by a handful of Republican conservatives.

After the tax bill passed, Reagan blamed the necessity for it on the spending policies of past Democratic administrations.

His pattern, as governor and president, has been to challenge the legislative body publicly and bring pressure on it through televised public appearances.

Always he threatens confrontation and often goes to the brink, pulling back just at the edge.

The resulting compromises often give him more than half of what he set out to accomplish, and the results are frequently represented as being close to his original goals.

Yesterday, both chief of staff James A. Baker III and White House counselor Edwin Meese III said that passage of seven of 13 appropriations bills, only three of which were passed in the lame-duck session, was a major victory.

Baker said approval of the defense budget, even without production funds for the MX, was particularly significant.

One glimpse of the pragmatism of Reagan and those close to him came Monday morning in a conversation between national security affairs adviser William P. Clark and Secretary of Defense Caspar W. Weinberger.

Both men have worked with Reagan for more than 15 years and know him well enough to look beyond the presidential rhetoric to the results he expects.

At the time Clark called Weinberger, the president's national security advisers were unhappy over the MX defeat and talking about the desirability of a veto.

"We've looked at the language and we can live with it," Weinberger told Clark, who agreed.

Reagan agreed, too. Once again, he understood the language of compromise.