I'm turning a list into a set in Python, like so:
request.session['vote_set'] = set(request.session['vote_set'])
So I can easily do a if x in set
lookup and eliminate duplicates. Then, when I'm done, I reconvert it:
request.session['vote_set'] = list(request.session['vote_set'])
Is there a better way to do this? Am I potentially doing something dangerous (or stupid)?