Skip to content

Multi dispatch for methods #39

@otchita

Description

@otchita

Hello,

As I was using this library for multi dispatching for functions, I was wondering if the same functionality can be added to methods as well. It would look some like this:

class Test:

    @multidispatchmethod
    def meth(self, *args, **kwargs):
        ...

    @meth.register(int, float)
    def _(self, x: int, y: float):
        ...

    @meth.register(str, str)
    def _(self, x: str, y: str):
        ...

I would be open to work on this eventual feature 😄 .

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions