Reputation: 679
Is there are any way to dispatch a function which arguments may be:
func(lambda x: x)
)func(a='some sting', b='some other string')
)As I see it, singledispatch
decorator from functools
only supports dispatching on the first argument, which in my case won't work. Am I missing something?
Upvotes: 2
Views: 82
Reputation: 8066
You are not missing anything. single dispatch won't solve your problem
https://pypi.python.org/pypi/multipledispatch
can help you with positional arguments but not keywords :(
Upvotes: 1