AndreaCensi/contracts — pull request #28 by ChrisBeaumont (2014-11-17 20:42:42+00:00)
Title: Allow args/kwargs to be passed to Extension contracts

Hi @AndreaCensi

Some more experimentation on my end: this change would allow you to pass args/kwargs into custom contracts:

```python
@new_contract
def greater_than(value, thresh):
return value > thresh

parse('greater_than(3)').check(4)
parse('greater_than(3)').fail(3)
```

This provides a way for users to implement missing/undocumented features like #23, and would also address the issue I raised in #26

```python
@new_contract
def t(value, typ):
return isinstance(value, typ)

parse('t($Foo)')
```

Thoughts?