Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fine-grained control over function name replacements #160

Open
ZibingZhang opened this issue Dec 10, 2022 · 0 comments
Open

Fine-grained control over function name replacements #160

ZibingZhang opened this issue Dec 10, 2022 · 0 comments
Assignees
Labels

Comments

@ZibingZhang
Copy link
Contributor

ZibingZhang commented Dec 10, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants