Wessel

Results 126 comments of Wessel

Hey @repst! Thanks for sharing this. I think that’s a neat little trick which finds an interesting middle ground between user friendliness and flexibility. :)

Hey @sylvorg! Thanks for opening an issue. :) This sounds very reasonable. I’m currently away, but should be back soon. I will get back to you some time next week.

Hey @sylvorg! I'm back again. I think such a metaclass could be useful and would be a very sensible addition to the library. :) Unfortunately, I don't have the capacity...

@sylvorg, very sorry for the super late reply. Work has been very busy, meaning that I have less-than-usual capacity for side projects. :( I think a separate file would make...

@sylvorg I think that looks great!! What would you think of something like this: ```python from plum import Dispatcher, configure_dispatch dispatch = Dispatcher() class MyClass(metaclass=dispatch.meta): @configure_dispatch(precedence=1) def method(self, x): return...

@sylvorg, haha feel free to export an alias `plume = configure_dispatch` too. :P > So would I just add meta as a nested class in Dispatcher? Maybe use a `@property`...

@PhilipVinc, whoa, you might have caught onto a pretty serious bug. I'm wondering what the right formalism is to view this. One perspective is to make a distinction between concrete...

Hey @ggoretkin-bdai, I'm afraid that there might not be a perfect solution for this. One way is to automatically apply `Val`, like this: ```python from functools import wraps from plum...

@ggoretkin-bdai, the name `rational_to_number` actually does not matter. You should be able to use a generic name in this way: ```python @conversion_method(type_from=Rational, type_to=Number) def perform_conversion(x): return truediv(x.num, x.denom) @conversion_method(type_from=Real, type_to=Number)...

@rtbs-dev, indeed thanks for pointing this out! Really nice that it seems to work!! @ggoretkin-bdai It's unfortunate that the performance is not great. I think that getting the performance on...