coady / multimethod

Multiple argument dispatching.
https://coady.github.io/multimethod
Other
284 stars 23 forks source link

Cannot use return annotations for @overloaded functions. #14

Closed mierzejk closed 4 years ago

mierzejk commented 4 years ago

If an @overloaded function is decorated with the return annotation, then the following error is raised:

File "multimethod/multimethod/__init__.py", line 260, in <genexpr> if all(predicate(arguments[name]) for name, predicate in func.__annotations__.items()): KeyError: 'return'