How to type annotate never ending generators? #960
Unanswered
kumaraditya303
asked this question in
Q&A
Replies: 4 comments 2 replies
|
I don't think this is currently possible, or at least well-defined, although your solution feels "natural" to me. Maybe this is something that type checkers could implement? |
0 replies
|
There is no example of NoReturn with generators in PEP 484 either https://www.python.org/dev/peps/pep-0484/#the-noreturn-type |
0 replies
|
Perhaps the authors of PEP 484 can clarify here what should NoReturn do when used in generators? |
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
How to type annotate never ending generators?
My current code:
All reactions