Paul Rubin <http://[EMAIL PROTECTED]> writes: > binops = {'+': (lambda x,y: x+y), > '-': (lambda x,y: x-y), > '*': (lambda x,y: x*y), > '/': (lambda x,y: x/y), > '**': (lambda x,y: x**y) > } > How would you refactor that, with no lambda?
Ok, with operator.add and so forth. I don't remember if I knew about those at the time. You can easily see though, how additional such simple functions might be wanted, that aren't in the operator module. -- http://mail.python.org/mailman/listinfo/python-list