In India, the anti-defection law does discourage one specific kind of defection: an elected legislator openly voting against their party’s direction or leaving the party without risking disqualification from the House. But it has not ended party switching. It has made the timing and legal route of a switch more consequential—and often turned the Speaker into the person at the centre of the dispute.
Under the Tenth Schedule, the Speaker or, in a state, the Assembly Speaker decides disqualification petitions. That can be a politically charged arrangement when the Speaker belongs to a party involved in the dispute. If a decision is delayed, legislators may remain in office while the government’s numbers are contested. Courts can review the Speaker’s decision, but judicial review usually comes after the dispute has begun.
The law can also change how defections happen. Rather than a single legislator crossing the floor, a group may seek to switch sides together, resign, or contest a subsequent election. Those routes involve different legal and political considerations; none makes every switch automatically lawful. The result is that the law may raise the cost of an open, individual defection without removing the incentive to reshape a governing majority.
So the short answer is: both. The law can deter legislators from defying their party in the House, but it also shifts much of the contest to disqualification proceedings, questions about timing and procedure, and the Speaker’s impartiality. Whether that trade-off is acceptable depends partly on whether the Speaker can decide petitions promptly and independently. Proposals to give that role to a separate tribunal or another neutral authority aim to address the conflict-of-interest concern, though they would not by themselves settle every dispute over party switching.