Skip to content

Fine-grained control over function name replacements #160

Open
@ZibingZhang

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.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions