We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
import itertools def foo(arg: int | None): it = itertools.count() if arg is None else range(arg) for i in it: print(i)
Now gives:
test40.py:5: error: Item "range" of "range | Iterator[int]" has no attribute "__next__" [union-attr]
The proximal cause is probably the switch away from unions in ternary
The text was updated successfully, but these errors were encountered:
fix
2aeebfe
Fixes python#17945
Fix iteration over union (when self type is involved) (#17976)
539513a
Fixes #17945
dict_items
Fix iteration over union (when self type is involved) (python#17976)
34d8603
Successfully merging a pull request may close this issue.
Now gives:
The proximal cause is probably the switch away from unions in ternary
The text was updated successfully, but these errors were encountered: