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

[QUESTION] what is extract_block supposed to do? #442

Open
AckslD opened this issue Feb 20, 2024 · 0 comments
Open

[QUESTION] what is extract_block supposed to do? #442

AckslD opened this issue Feb 20, 2024 · 0 comments

Comments

@AckslD
Copy link

AckslD commented Feb 20, 2024

I'm just trying to understand the different features and tried some things on this python snippet:

def f(a, b):
    if True:
        y = a + b
        z = y + b
    return z + y

If I call Refactor extract_block (either in visual mode or not) and give the new function the name test I get:

def test(a, b):
    if True:
        y = a + b
        z = y + b
    return z + y



def f(a, b):
    test(a, b)

which I'm not sure what's the purpose, seems like just a copy of the function and f is now broken since it doesn't return anything.

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

No branches or pull requests

1 participant