You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This breaks the current implementation of multipledispatch.dispatch():
from __future__ importannotationsimportmultipledispatch@multipledispatch.dispatch()deffunc(x):
raiseNotImplementedError(x)
@multipledispatch.dispatch()deffunc(x: int):
returnf"x {x} int"print(func(1))
Traceback (most recent call last):
File "/home/user/tmp/single.py", line 11, in <module>
@multipledispatch.dispatch()
File "/home/user/.local/pipx/venvs/ipython/lib/python3.7/site-packages/multipledispatch/core.py", line 68, in _
dispatcher.add(types, func)
File "/home/user/.local/pipx/venvs/ipython/lib/python3.7/site-packages/multipledispatch/dispatcher.py", line 225, in add
(typ, str_sig, self.name))
TypeError: Tried to dispatch on non-type: int
In signature: <int>
In function: func
Activity