plum icon indicating copy to clipboard operation
plum copied to clipboard

Multiple dispatch in Python

Results 85 plum issues
Sort by recently updated
recently updated
newest added

It would be useful to have a list of projects that use plum, or even other Python MD libraries. Best would be OSS so we can see exactly how it...

Hi, thanks for the nice project! I found that the [_types_of_iterable](https://github.com/wesselb/plum/blob/fb1ecf1733147d23fbb08d3f37b65425d76e9465/plum/parametric.py#L613) could be very slow if the iterable is very large. This could be a big problem for practical application....

How do doc strings work with several methods? It would be nice to put different doc strings in different methods. I don't think this works. Is there a recommended way...

enhancement

If my benchmarks are accurate (using `benchmark.py`), cythonising `plum.function` is at best 2x faster. For our use-case — a high-level framework on top of lower-level libraries like `numpy` and `torch`...

If I use pylance to type check functions in Python, all multiple-dispatched functions are shown as > Function declaration "name_of_function" is obscured by a declaration of the same name I...

It seems that the plum has issue in dispatch function when the output is Generator I have the sample code as ``` from typing import Generator, List from plum import...

enhancement

See [this comment](https://github.com/fastai/fastcore/pull/415#discussion_r895616219).

It would be great if we could offer some ' closest methods matches' when hitting an error, similarly to what Julia does. If @wesselb you pointed me in the right...

enhancement

Simple example: ```python from typing import TypeVar, Generic from plum import dispatch T = TypeVar('T') class FooBar: pass class Foo(Generic[T]): pass class Bar: def __init__(self): pass @dispatch def some_method(self, foo:...

enhancement

I am working with nested NumPy arrays (arrays of arrays) and I want to dispatch based on its nesting level. ```python from plum import dispatch def something(a: NestedArray[0]): pass def...

bug