-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Update docs about variables and aliases #8200
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
Conversation
Many tests are broken due to the newly added note, I'd like to first confirm the wording and availability of this PR before pervasively modifying the tests |
I almost forget about this PR.....Now I modify the test suite to apply the new change and pass the tests. But I am worried about that this PR may be too pervasive |
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.
Looks good, I just have an idea about the section title.
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.
Thanks!
I was just pointed to the docs introduced by this PR (Variables vs type aliases) and for a few moments I was very confused. Perhaps this was because I was trying to create a type alias for But the docs (copied verbatim from Ivan's text in #3494) did not help. I think what the docs are trying to point out is that both a variable with type I'm still not sure how to best write this down, but I feel that the docs as they currently exist could still use some improvement. |
@gvanrossum Thanks for the feedback! The docs here definitely needs refinement since #9238 also points out its incompleteness. I'll file a PR to update that and will request for your review there. |
resolves #3494(Since module types are tracked in #3500)
Following #8187 (comment) and #3494, if I understand correctly and the semantics in #3494's example code has been fixed(report error on re-assign
Alias = B
, the remaining work of #3494 is to update the docs, which is the main focus of this PR.Newly added docs are in
common issues and solutions
section, with the content mostly adapted from Ivan's example in #3494. And a note point to the docs is also added.When reviewing the PR, I think there are two things to tweak:
common issues
oralias type
?