Skip to content

Releases: beartype/plum

v2.4.1

02 Jun 17:22
4213056
Compare
Choose a tag to compare

v2.4.0

02 Jun 16:57
a5a1cd4
Compare
Choose a tag to compare
  • Improvement to the dispatch algorithm by avoiding unnecessary ambiguities. See #117 and #151. The algorithm is still not optimal, but this is a clear step in the right direction. Thanks to @PhilipVinc!

v2.3.6

12 May 17:17
9585b3e
Compare
Choose a tag to compare
  • Add type_nonparametric (thanks @nstarman!).

v2.3.5

21 Apr 15:11
Compare
Choose a tag to compare
  • Add allow_fail to ModuleType.

v2.3.4

21 Apr 07:56
300487f
Compare
Choose a tag to compare
  • Add type_unparametrized. (Thanks @nstarman! :) )

v2.3.3

25 Mar 19:34
Compare
Choose a tag to compare
  • Let conversion_method return the function. (Thanks @nstarman!)

v2.3.2

21 Jan 10:33
Compare
Choose a tag to compare
  • Improve rendering of function calls in exceptions.
  • Don't print a @ if the source cannot be resolved.

v2.3.1

21 Jan 10:05
Compare
Choose a tag to compare

v2.3.0

20 Jan 19:51
68f5110
Compare
Choose a tag to compare

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:

image

In case of a mismatch, the exception shows which methods you could've meant:

image

And in the case of an ambiguity, the exception nicely shows which methods cannot be disambiguated:

image

v2.2.2

23 Sep 08:11
Compare
Choose a tag to compare
  • Update Beartype to 0.16.2.
  • Fix #105 (thanks @PhilipVinc!).
  • Add PLUM_SIMPLE_DOC environment variable.