It should be the responsibility of the object to maintain information about what its raw_choices, count, etc are. I would say use classes or dicts (probably classes) rather than all these if-else clauses.