8000 Feature Request: Python - Add dict assignment · Issue #7 · filNaj/tree-setter · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Feature Request: Python - Add dict assignment #7

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

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

Feature Request: Python - Add dict assignment #7

ColinKennedy opened this issue Aug 11, 2023 · 1 comment

Comments

@ColinKennedy
Copy link
ColinKennedy commented Aug 11, 2023

Allow for simple foo["bar"] to be mutated. e.g.

foo = {}
foo["bar"]# Cursor goes here

Would expand to

foo = {}
foo["bar"] = # Cursor goes here

But not if followed by further qualifiers such as ,

foo = {}
foo["bar"],# Cursor goes here

Adding a space does not expand here

foo = {}
foo["bar"], =# Cursor goes here

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

@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
0