-
-
Notifications
You must be signed in to change notification settings - Fork 21.7k
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
Overhaul Dictionary Documentation #69594
Overhaul Dictionary Documentation #69594
Conversation
if "Godot" in {"Godot": 4}: | ||
print("The key is here!") # Will be printed. | ||
[/codeblock] | ||
[b]Note:[/b] This method returns [code]true[/code] as long as the [param key] exists, even if its corresponding value is [code]null[/code]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This small note may or may not be mergeable with the very first sentence. Something along the lines of "Returns [code]true[/code] if the dictionary contains an entry with the given [param key], regardless of its corresponding value"
38f7853
to
aebd72c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look good, spotted nothing so far. Will let it stay open for a bit longer and merge if not one else notices anything.
I should've left it as a draft as I also wanted to revamp the leading description. It's better to merge it ASAP though I suppose. |
bba2f73
to
3416281
Compare
Updated. Also added a small instruction on how to iterate a dictionary in the leading description, because if I didn't I would've later felt guilty about it. |
3416281
to
d68df24
Compare
Thank you very much for the feedback |
d68df24
to
b77f935
Compare
Thanks! |
Continuation of especially #69451 and #68838...
Made the wording match how other classes are documented a lot more closely;
Made use of
[param]
and several other strong references more often;Changed words where it felt necessary, where they could be mistaken for another concept of Godot's API, where technical terms are more appropriate. For example:
Modified examples extensively, with the main goal to improve readability and variety:
# Prints "5"
-># Prints 5
);COMPLETELY stripped away the part about Dictionary comparisons and hashes from the leading description.
Updated
Dictionary(from)
constructor's description to be correct.Feedback is very, very welcome.