-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
gh-110907: AC: Disallow using *
with vararg
#110908
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
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 don't feel this matters much: it improves consistency with Python, but I feel the TypeVar signature is clearer at a glance with the extra *
. Maybe cc @erlend-aasland or @AlexWaygood for other opinions.
I haven't taken a proper look at this yet (though at first glance, it looks good). But I agree with @sobolevn that this is a problem worth fixing. I think AC should aim to be as consistent as possible with normal Python syntax in a case like this; doing otherwise leaves room for ambiguity in how it should be parsed, and is going to be confusing for people new to AC, I feel |
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.
LGTM. I chatted to @erlend-aasland offline and I think he's also in favour
Not sure if this will cleanly backport (and probably not worth spending too much time on it if it doesn't), but we may as well give it a go |
Thanks @sobolevn for the PR, and @AlexWaygood for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12. |
Sorry, @sobolevn and @AlexWaygood, I could not cleanly backport this to
|
Sorry, @sobolevn and @AlexWaygood, I could not cleanly backport this to
|
As I thought! |
*
after vararg definition #110907