plum
plum copied to clipboard
method return value is changed
I have this method (minimal just to show the issue)
from typing import List
def f() -> List[int]:
return (None)
f()==None as expected
Now I wrap it in @dispatch (note you may have to restart python because otherwise you get a warning on overwriting f):
from typing import List
from plum import dispatch
@dispatch
def f() -> List[int]:
return (None)
and suddenly my function misbehaves
f()==[None]
So it returns a list with 1 element, instead of None. Can this please be fixed?