Skip to content

Conversation

@mrahtz
Copy link
Contributor

@mrahtzmrahtz commented May 7, 2022

@serhiy-storchaka Darn, I'd just finished this when I realised you'd also been working on the same thing in main...serhiy-storchaka:typing-subst-unpacked. I think the version in my branch uses more helper functions in a way that improves readability, but your version does things in a way that's more consistent with the new design of typing.py - and of course fixes a lot of the C stuff that my branch doesn't touch. How do you want to proceed here?

Quick summary of what's in this PR:

  • Forbid the use of unpacked arguments unless the generic alias can take an arbitrary number of type parameters (as determined by checking for a TypeVarTuple in the parameter list)
  • Unpack finite-length tuples in argument lists

@mrahtz
Copy link
ContributorAuthor

mrahtz commented May 7, 2022

Oh, whoops, I see Serhiy's work already has a PR at #92335. Amazing! I'll close this PR for now and comment there instead.

@mrahtzmrahtz closed this May 7, 2022
@mrahtzmrahtz deleted the subst-fixes-2 branch May 8, 2022 11:03
Sign up for freeto 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.

2 participants

@mrahtz@bedevere-bot