Skip to content
This repository was archived by the owner on Apr 18, 2026. It is now read-only.
This repository was archived by the owner on Apr 18, 2026. It is now read-only.

Fine-grained control over function name replacements #160

Description

@ZibingZhang

Description

In #152, we discovered a case that when factorial is replaced by !, the behavior is not desirable.

In particular, when defining a recursive function factorial with style=ALGORITHMIC, e.g.

def factorial(n):
    if n == 0:
        return 1
    else:
        return n * factorial(n - 1)

we should not replace factorial with ! in the recursive case, because that is also the name of the function.

Expected behavior

factorial should stay as factorial.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions