Skip to content

Variable positional arguments #115

@sylvorg

Description

@sylvorg

Hello! Sorry, it's me again! 😅

Is there any way to implement a variable number of positional arguments, like in the following example:

from multimethod import multimethod

@multimethod
def call():
    print("Hello, world!")

@multimethod
def call(name):
    print(f"Hello, {name}!")

call() # Hello, world!
call("Foo") # Hello, Foo!

Thank you kindly for the help, and sorry again for the multiple issues!

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