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

Feature Request: Python - Add index assignment #8

Open
ColinKennedy opened this issue Aug 11, 2023 · 1 comment
Open

Feature Request: Python - Add index assignment #8

ColinKennedy opened this issue Aug 11, 2023 · 1 comment

Comments

@ColinKennedy
Copy link

ColinKennedy commented Aug 11, 2023

Allow for simple foo[0] to be assigned. e.g.

foo = ["bar"]
foo[0]# Cursor goes here

Would expand to

foo = ["bar"]
foo[0] = # Cursor goes here

But not if followed by further qualifiers such as ,

foo = ["bar"]
foo[0],# Cursor goes here

Adding a space does not expand here

foo = ["bar"]
foo[0], # Cursor goes here

And of course if foo[0] is in the middle of an existing expression then do not do assignment. e.g. return foo[0] wouldn't want to expand to return foo[0] = accidentally.

@filNaj filNaj closed this as completed in e5c24e8 Aug 13, 2023
@filNaj filNaj reopened this Aug 13, 2023
@filNaj
Copy link
Owner

filNaj commented Aug 13, 2023

It is now partially fixed. I say partially because for now, the only way I found to resolve this issue is by not adding an = if a comma exists in the line.

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

2 participants