In what situation should the built-in 'operator' module be used in python?
- by apphacker
I'm speaking of this module:
http://docs.python.org/library/operator.html
From the article:
The operator module exports a set of
functions implemented in C
corresponding to the intrinsic
operators of Python. For example,
operator.add(x, y) is equivalent to
the expression x+y. The function names
are those used for special class
methods; variants without leading and
trailing __ are also provided for
convenience.
I'm not sure I understand the benefit or purpose of this module.