Releases: beartype/plum
Releases · beartype/plum
v2.4.1
v2.4.0
v2.3.6
v2.3.5
v2.3.4
v2.3.3
v2.3.2
v2.3.1
- Fix support for
Annotated
, thanks to @hodgespodge!
v2.3.0
This update brings very pretty method printing! Yay. A massive thanks to @PhilipVinc, who contributed quite many PRs to implement this.
Consider
from numbers import Number
from plum import dispatch
@dispatch
def add(x: int, y: Number):
return x + y
@dispatch
def add(x: Number, y: int):
return x + y
Now methods print nicely:
In case of a mismatch, the exception shows which methods you could've meant:
And in the case of an ambiguity, the exception nicely shows which methods cannot be disambiguated: