-
Notifications
You must be signed in to change notification settings - Fork 28
Closed
Description
code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from multimethod import multimethod
@multimethod
def f(a: dict[int, int]):
pass
f({1:2})
f({})
run and get output
Traceback (most recent call last):
File "/mnt/d/Home/Downloads/./main.py", line 11, in <module>
f({})
File "/mnt/d/Home/Downloads/multimethod/multimethod/__init__.py", line 188, in __call__
return self[tuple(map(self.get_type, args))](*args, **kwargs)
File "/mnt/d/Home/Downloads/multimethod/multimethod/__init__.py", line 184, in __missing__
raise DispatchError(msg, types, keys)
multimethod.DispatchError: ('f: 0 methods found', (<class 'dict'>,), [])
similarly, I cannot pass empty list [] into list[int]
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels