It's often useful to define element-wise operators for tuples, particularly when they are used to represent coordinate pairs. In python a simple operator factory function can be used to create these tuple operators from their scalar equivalents.

>>> import operator

>>> def tuple_operator_factory (operator):
...     def toperator (*args):
...         return tuple(map(lambda x: operator(*x), zip(*args)))
...     return toperator

>>> tsub = tuple_operator_factory(operator.sub)
>>> tsub((2,3), (1,1))
(1,2)
>>> tmul = tuple_operator_factory(operator.mul)
>>> tmul((2,2), (3,4))
(6,8)