I\'m speaking of this module: http://docs.python.org/library/operator.html
From the article:
The operator module exports a set of functions
Possibly the most popular usage is operator.itemgetter. Given a list lst of tuples, you can sort by the ith element by: lst.sort(key=operator.itemgetter(i))
Certainly, you could do the same thing without operator by defining your own key function, but the operator module makes it slightly neater.
As to the rest, python allows a functional style of programming, and so it can come up -- for instance, Greg's reduce example.
You might argue: "Why do I need operator.add when I can just do: add = lambda x, y: x+y?" The answers are:
operator.add is (I think) slightly faster.operator.add is picklable, while lambda is not. This means that the function can be saved to disk or passed between processes.