Patternslib/Patterns — pull request #104 by wichert (2012-10-29 09:29:02+00:00)
Title: function-based parser defaults

For injection it would be great if we could define a function to return the default value:
```
parser.add_argument("selector", function($el) {
var id = ($el.attr('href') || $el.attr('action') || "").split("#")[1]
return id && "#" + id;
}
```

This would simplify extractConfig code in injection and feels like a natural extension: fixed default, other argument as default, function providing default.