Minor correction in documentation
Minor change in documentation
Removed unneeded variable self_of_parent
Tidying up
Tidied a couple of 'for' loops from:
    for t in ...
to:
    for t,pat ...
Replaced use of 'not' to '!=' in some conditions
Removed unneeded function wrapped_f
Added support to **kwargs
User function can now return a value. Also an exception DispatchFailed is raised if a pattern cannot be found
Added a test for returning a value
Merge branch 'master' into develop