mrocklin/multipledispatch — pull request #3 by mrocklin (2014-02-28 05:03:48+00:00)
Title: Vararg dispatch

We designate dispatch on variable number of arguments as a list containing a single type. Vararg signatures are checked after normal signatures.

```Python
@dispatch([int])
def foo(*args):
return 'ints'

@dispatch([float])
def foo(*args):
return 'floats'

@dispatch([object])
def foo(*args):
return 'objects'

assert foo(1, 2) == 'ints'
assert foo(1.0, 2.0) == 'floats'
assert foo(1, 2.0) == 'objects'
```