Hi,

Are you aware of the Python operator module?
It provides function equivalents of all (most?)
python operator. So instead of a==b, you can
state operator.eq(a,b). As a result, you can
loop over the key/value pairs in the dict and
built your logic with the operator.eq, 
operator.and_, and operator.or_ (notice the 
trailing underscore to avoid clashing with
normal "and" and "or" statements.

Marco
 
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to