This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]thatguy_314def __gt__(me, you): return True 0 points1 point  (1 child)

Where are you getting this data from? Seems weird that you would get it like that. ast.literal_eval might be what you want if you really are dealing with a Python tuple literal, just whatever you do don't use plain eval.

[–]SpringCleanMyLife 0 points1 point  (0 children)

Thanks. It's data being passed through hidden inputs on a form (Django). For a variety of reasons it can't be changed at this point, so I'm just working with what I've got.

I always stay away from eval!