Q:

Treating Python binary operators as values

This must be a FAQ, but I spent five minutes searching, and couldn't find it. In Python, how can I obtain the value that corresponds to a binary operator? 
To be more specific; here's an apply-to-8-and-9 function:
def apply_to_8_and_9(fun):
  return fun(8,9)

Now, suppose I want to pass the < function to apply-to-8-and-9. I can do this:
apply_to_8_and_9(lambda a,b: a < b)

... but I'd really rather not have to eta-expand the < operator. Is there some way to avoid this?
Thanks!

A:

Use the operator module. < in particular is operator.lt.
>>> import operator
>>> help(operator.lt)
Help on built-in function lt in module _operator:

lt(...)
    lt(a, b) -- Same as a<b.

