Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.3k
gh-126085: Addtp_iter to TypeAliasType to allow star unpacking#127981
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Misc/NEWS.d/next/Core_and_Builtins/2024-12-15-16-56-26.gh-issue-126085.BvyEXk.rst OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
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.
Mostly LGTM, with two comments.
Misc/NEWS.d/next/Core_and_Builtins/2024-12-15-16-56-26.gh-issue-126085.BvyEXk.rst OutdatedShow resolvedHide resolved
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
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!
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.
Thank you!
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, some nits.
Objects/typevarobject.c Outdated
| #include"clinic/typevarobject.c.h" | ||
| #definetypevartuple_iter unpack_iter |
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.
I don't think we need these defines, just useunpack_iter directly.
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.
This was a suggestion from@ZeroIntensity to keep the naming more consistent. I can remove them though
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.
Could you remove them?
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.
I was complaining originally about the naming inconsistency, but in hindsight, it's probably better than the extra#define.
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.
I'll remove them (and fix the conflict) later today :)
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.
Removed!
Uh oh!
There was an error while loading.Please reload this page.
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
e091520 intopython:mainUh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
As@JelleZijlstra suggested, this simply adds a
tp_iterslot that returnsUnpack[self], same as we do for TypeVarTuple.Feedback welcome!
📚 Documentation preview 📚:https://cpython-previews--127981.org.readthedocs.build/en/127981/library/typing.html#typing.TypeAliasType