-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Fix misplaced bad example #10782
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
Fix misplaced bad example #10782
Conversation
Moved the bad example for the inferred type for functions that return super types directly after its related statement.
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.
What about this example makes you think it's misplaced? The entire page has the good example shown first and the bad example shown second.
Edit: (My bad, I forgot that I had placed it before the good example and thought you were referring to moving it in general. I place it before the good example because the statement was directly mentioning the behavior displayed in the bad example, but I see how it would be confusing to switch up the order, so I'll change it to come after the good example. The main point of the PR was just to place it closer to its context, which it would be either way.) The It was like this: Statement about explicitly stating type, useful for get_node(). The good and bad examples both regard explicit type stating, but the bad only features type hints, so is not related to the I'd say, it's confusing to add an alternative in the middle of a list of examples. It's not done anywhere else in the page, either. Explanations – of what was good/bad –, sure, they're related to the example, but an alternative doesn't fit there, as it's related to the topic the examples are about, not the examples themselves. |
Moved the bad example below the good example to stay consistent with previous instances.
Removed Good example title from the example for the "as" keyword, as it is a neutral example.
Thanks! And congrats on your first merged PR! |
Moved the bad example for the inferred type for functions that return super types directly after its related statement.