Skip to content

Add warning to Object._iter_init docs about using alternative state#118102

Open
aurpine wants to merge 1 commit intogodotengine:masterfrom
aurpine:remove-object-_iter_init-state-reference
Open

Add warning to Object._iter_init docs about using alternative state#118102
aurpine wants to merge 1 commit intogodotengine:masterfrom
aurpine:remove-object-_iter_init-state-reference

Conversation

@aurpine
Copy link
Copy Markdown

@aurpine aurpine commented Apr 2, 2026

This follows the update in godotengine/godot-docs#11901 that will remove the technique referenced in Object._iter_init docs. It is replaced with a warning about not using the iter parameter.

@dalexeev
Copy link
Copy Markdown
Member

dalexeev commented Apr 2, 2026

Perhaps it would be better not just to remove the mention of the alternative, but to add a note explaining why you shouldn't use this approach (nested loops)? Also, would it be worth keeping a link to the online documentation, in case it explains the iterator API in a bit more detail?

@aurpine
Copy link
Copy Markdown
Author

aurpine commented Apr 2, 2026

Added a section explaining the alternative. Maybe we could move this to the tutorial page instead to keep the class reference lean?

@dalexeev
Copy link
Copy Markdown
Member

dalexeev commented Apr 2, 2026

Please squash commits into one. To do this you need a local git client, GitHub web interface doesn't support it.

It might also make sense to update the commit message and PR title, given that you're no longer removing the mention, but emphasizing that this is a less desirable approach.

@aurpine aurpine force-pushed the remove-object-_iter_init-state-reference branch from 6fde622 to 3f8e17d Compare April 2, 2026 17:05
@aurpine aurpine changed the title Remove reference in Object._iter_init docs mentioning alternative iterator state Add warning to Object._iter_init docs about using alternative state Apr 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants