I've never claimed (or thought) that Sanders would have been the better candidate to beat Trump (or Generic Republican). If pushed I'd probably say (would I be right? who knows!) that Clinton was probably the better choice for electability reasons, though I think generally electability arguments are an exercise in navel gazing. Really none of us know. Choosing "the most electable candidate" hasn't served Democrats well in most elections (we forget, but in almost all cases the losers were thought of as being the most electable in the primary). Mostly I think this is a silly debate which misses the real point: a weird old Jewish dude that most people had never heard of came pretty damn close to winning the Dem primary. "Pretty damn close" does not mean he was ever going to win, absent some massive Clinton flameout. There was never one moment when I thought he could or would win. But the fact that he came pretty close did not mean he should have been dismissed (by some) as a t0tal l0000zer man. Despite not winning, he achieved the practically impossible. This is not taking away from what Clinton achieved, but her achieving the impossible was setting herself up to be the almost inevitable winner of the 2106 primary. She'd done that before the voting even started.
Instead of marveling at what Sanders had done, for reasons I could only conclude were "sore winnerism," many people spent trying to kick more dirt over the grave of his campaign. Instead they should have been trying to figure out how and why he did so well. Maybe it was all just sexist Berniebros who couldn't stand voting for a woman. Also, too, maybe not.
I voted for Sanders in the primary, but if the PA primary had been earlier I probably would have voted for Clinton. He'd already lost, and I figured I'd cast my vote for "team Lefty."