Digby has a post on how annoying it is that Obama express admiration for McCain's stand on torture legislation during the third debate. Obviously, she's right on the merits: that John McCain demonstrated his political cravenness by selling out his principles to provide cover for the Bush administration's pro-torture policies. But I think the Obama campaign made the right tactical decision here.
First, the facts of the situation aside, making the public case that McCain helped facilitate torture would be incredibly difficult. It goes against every entrenched media narrative about McCain, and will more likely than not be dismissed as a smear by most people unwilling to reevaluate their assumptions about McCain.
Second, in a situation where McCain is widely viewed as playing dirty in his negative campaigning against Obama, it allows Obama to take the high road and look gracious in contrast, driving home the "change" theme of the campaign.
Finally, it sends a message to McCain, who knows better than anyone the depths of his betrayal on torture. Obama didn't just say "good job on that" when the subject came up: he brought up torture himself for the specific purpose of saying, to McCain, "we both know that you sold out to Bush on what is supposedly one of your core principles, so watch it with this 'I'm not Bush' stuff." It's an intimidation move. Not really a threat, since he can't make good on it for the two reasons mentioned above, but a way of needling McCain by reminding him of his own lack of principle.
That's how I read it, anyway.