'Return OriginalCommand(operation) after registering function.
Registration adds an operation: function pair to ._operations.
It also adds a widget function attribute that masks the tkinter
class instance method.  Method masking operates independently
from command dispatch.
If a second function is registered for the same operation, the
first function is replaced in both places.'

def register(self, operation, function):

    self._operations[operation] = function
    setattr(self.widget, operation, function)
    return OriginalCommand(self, operation)
