Revision 50eaf441 stv.py

b/stv.py
270 270
            if candidate not in candidates:
271 271
                candidates.append(candidate)
272 272
                vote_count[candidate] = 0
273
        if selected in allocated:
274
            allocated[selected].append(ballot)
275
        else:
276
            allocated[selected] = [ballot]
273
            if candidate not in allocated:
274
                allocated[candidate] = []
275
        allocated[selected].append(ballot)
277 276
        vote_count[selected] += 1
278 277

  
279 278
    # In the beginning, all candidates are hopefuls

Also available in: Unified diff