| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
There was a problem hiding this comment.
I think this is a superior rule, but I would be likely to think so, since it's the rule ty already implements 😆
I think this PR needs some improvements, but I'm in favor of the change.
Sorry, something went wrong.
| else: | ||
| ID3 = 2 # OK | ||
|
|
||
| ID4: Final[int] # E: not exhaustive assignment |
There was a problem hiding this comment.
I'm not sure I agree that it should be required to enforce exhaustive assignment. Why should this be enforced for a Final name, but not for other names?
Sorry, something went wrong.
There was a problem hiding this comment.
i would expect a type checker to enforce this for all names. but this change is only regarding Final, which to me is even more "static" than normal variables, that a Final name without a value should always be impossible
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
https://discuss.python.org/t/clarify-final-assignment/106878