I think flip-flopping in politics is often a politician changing his view in a short amount of time and not admitting to the prior held view.
If a politician changes his view and publicly states that he held a very different view before but he was swayed by x, y, and z then I think nobody would accuse them of flip-flopping.
Good point, but people also need to understand the explanation, and they have to believe the change of mind is genuine and that x, y, and z are the genuine reasons (as opposed to some other contingent or craven reason) for the switch.
For example, John Kerry's "for it before I was against it" sounded to some like he was dissembling and hiding that he may have changed his opinion on an appropriations bill simply because the wars were becoming less popular with the public.
If a politician changes his view and publicly states that he held a very different view before but he was swayed by x, y, and z then I think nobody would accuse them of flip-flopping.