Skip to content

Is there a way to override-overload a function? #2

@wldhx

Description

@wldhx

That's mostly relevant for interactive usecases such as REPL or a Jupyter Notebook.

Suppose I have a function

def f(a: int):
    return a

and at some point (in an interactive session, with ^ already declared), want to change it, to, for i.,

def f(a: int):
    return a * 2

This would fail as of overloading==0.5.0 with OverloadingError: Failed to overload function 'f': non-unique signature. Can I somehow force an override?

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