Add support for looping over dictionaries' key and value (`for key, value in dict`)
### Describe the project you are working on N/A ### Describe the problem or limitation you are having in your project Lots of time, you will have to iterate through a dictionary. Whether it be searching for something, querying, etc. As of currently, Godot only allow for a `for key in dict` loop. While you can do `var value = dict[key]`, this can get annoying if you deal with dictionaries a lot and have to look at the value. ### Describe the feature / enhancement and how it helps to overcome the problem or limitation The idea is that Godot will allow you to do ` for key,value in dict` type of loop to make it quicker to also look at the value. ### Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams ```gdscript var dict = { "bruh": "moment", "one": "two", "two": "four", "four": "eight" } for key,value in dict: print(key, value) ``` ### If this enhancement will not be used often, can it be worked around with a few lines of script? It is impossible to modify how GDScript works using a plugin. ### Is there a reason why this should be core and not an add-on in the asset library? See above
Posted by atirutw on Oct 21, 2021, 2:14 PM
Tags
Related issues
- some bike vendor told me that the biggest problem with regular to ebike conversion was that regular bike frames were not strong enough to...
- I think of this as the kiosk economy.
- What a goofy comment.
- There's lots of evidence for positive influences of Caffeine on the body (some negative as well), especially the brain.
- Compose support in WSLc
- [RFC] Roadmap to v2.0
Raise real-world problems, find people facing the same issue, and discuss solutions.3,000 issues0 comments
support (Other)
some bike vendor told me that the biggest problem with regular to ebike conversion was that regular bike frames were not strong enough to...
I think of this as the kiosk economy.
What a goofy comment.
There's lots of evidence for positive influences of Caffeine on the body (some negative as well), especially the brain.
Compose support in WSLc
[RFC] Roadmap to v2.0
[Feature]: Add TurboQuant Support for KV Cache Quantization
Support for AGENTS.md and .agents/skills/, the community has been asking since August 2025
Add support for looping over dictionaries' key and value (`for key, value in dict`)
### Describe the project you are working on N/A ### Describe the problem or limitation you are having in your project Lots of time, you will have to iterate through a dictionary. Whether it be searching for something, querying, etc. As of currently, Godot only allow for a `for key in dict` loop. While you can do `var value = dict[key]`, this can get annoying if you deal with dictionaries a lot and have to look at the value. ### Describe the feature / enhancement and how it helps to overcome the problem or limitation The idea is that Godot will allow you to do ` for key,value in dict` type of loop to make it quicker to also look at the value. ### Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams ```gdscript var dict = { "bruh": "moment", "one": "two", "two": "four", "four": "eight" } for key,value in dict: print(key, value) ``` ### If this enhancement will not be used often, can it be worked around with a few lines of script? It is impossible to modify how GDScript works using a plugin. ### Is there a reason why this should be core and not an add-on in the asset library? See above
Comments (0)
No comments yet. Start the discussion.