Dynamic comparison operators

mlangenhoven at gmail.com mlangenhoven at gmail.com
Thu May 24 10:14:18 EDT 2012


I would like to pass something like this into a function
test(val1,val2,'>=')

and it should come back with True or False.

Is there a way to dynamically compare 2 values like this or will I have to code each operator individually?



More information about the Python-list mailing list