Skip to content

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

Merged
merged 1 commit into from
Oct 16, 2023

Conversation

sobolevn
Copy link
Member

@sobolevn sobolevn commented Oct 15, 2023

Copy link
Member

@JelleZijlstra JelleZijlstra left a 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.

@AlexWaygood
Copy link
Member

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

Copy link
Member

@AlexWaygood AlexWaygood left a 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

@AlexWaygood
Copy link
Member

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

@AlexWaygood AlexWaygood merged commit bad7a35 into python:main Oct 16, 2023
@miss-islington
Copy link
Contributor

Thanks @sobolevn for the PR, and @AlexWaygood for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12.
🐍🍒⛏🤖

@miss-islington
Copy link
Contributor

Sorry, @sobolevn and @AlexWaygood, I could not cleanly backport this to 3.12 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker bad7a35055dbe9e6297110eb8c72eb8edfefd42d 3.12

@miss-islington
Copy link
Contributor

Sorry, @sobolevn and @AlexWaygood, I could not cleanly backport this to 3.11 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker bad7a35055dbe9e6297110eb8c72eb8edfefd42d 3.11

@AlexWaygood AlexWaygood removed their assignment Oct 16, 2023
@AlexWaygood AlexWaygood removed needs backport to 3.11 only security fixes needs backport to 3.12 only security fixes labels Oct 16, 2023
@AlexWaygood
Copy link
Member

As I thought!

aisk pushed a commit to aisk/cpython that referenced this pull request Feb 11, 2024
Glyphack pushed a commit to Glyphack/cpython that referenced this pull request Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants