-
Notifications
You must be signed in to change notification settings - Fork 243
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
Generator optional parameters #716
Comments
PEP 484 currently doesn't support optional arguments to generics (note that
This gives an error on
Using various
|
This is a duplicate of #307. (Generator is probably among the few standard ABCs for which default type parameters would make sense.) |
@JelleZijlstra These issues aren't duplicates. #307 is about |
But you could use #307 to fix this issue. I guess they're not exact duplicates though. |
But it's a duplicate of https://bugs.python.org/issue31700. :) Closing again. |
Can the last two parameters of
Generator[YieldType, SendType, ReturnType]
be made optional? Usually, one uses generators without them:Iterator[YieldType]
also works, of course, butGenerator[YieldType]
is more specific.See also: python/mypy#4221
The text was updated successfully, but these errors were encountered: