It goes without saying that it's a very good thing that a person convicted of repeated domestic violence (and without really the slightest shred of doubt over his guilt) has been effectively forced to resign his parliamentary seat. But from the point of view of hard political calculation, is this a setback for the SNP? After all, if Walker had pigheadedly soldiered on, the party could have avoided a very tricky by-election, while still distancing themselves from the "independent" MSP. For the avoidance of doubt, a contest in Dunfermline would have been murderously difficult regardless of how it had come about, because the typical (although thankfully not universal) pattern in by-elections is that the incumbent government lose at least some ground - and the SNP government will be defending an absolutely wafer-thin majority.
But the reality is that this was a situation where the SNP just couldn't win. If Walker had stayed in place, he would have remained an acute embarrassment to the party, because everyone knew full well that he had been originally elected as an SNP candidate. So we all just have to put this one down to experience, and hope that lessons are learned that will prevent this entirely avoidable mess from ever occurring again. At least now a line will be drawn - in an ideal world the SNP will retain (or technically gain) the seat with a candidate who bears as little resemblance to Walker as humanly possible, or less ideally they will finish second in a constituency that is in any case traditional Labour territory, and will be seen to have accepted a fair penalty for their mistake in selecting Walker in the first place.
I'm slightly troubled, though, by the efforts I've seen on Twitter to browbeat the main parties into making this by-election an all-woman contest. It would certainly be tactically savvy for the SNP to select a female candidate, and fortunately it just so happens that the best potential candidate I can think of is a woman (Shirley-Anne Somerville). But the message that will be sent out by a deliberately concocted all-woman contest is that men are the guilty parties, who are atoning for their sins by leaving the floor to women on this occasion. That would be entirely inappropriate. These were not crimes committed by "men" - they were committed by an individual called Bill Walker. By all means, let's ensure that the tackling of domestic violence is a key issue for debate in this contest, but that debate should not censor - as is sadly all too common - the voices of male victims of domestic violence, or indeed female victims where the perpetrator was another woman.