FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-91162: Fix most generic type substitution test cases by mrahtz · Pull Request #92427 · python/cpython · GitHub

/ cpython Public

gh-91162: Fix most generic type substitution test cases - #92427

Closed
mrahtz wants to merge 1 commit into
python:mainfrom
mrahtz:subst-fixes-2
Closed

gh-91162: Fix most generic type substitution test cases#92427
mrahtz wants to merge 1 commit into
python:mainfrom
mrahtz:subst-fixes-2

Conversation

mrahtz commented May 7, 2022
edited
Loading

Copy link
Copy Markdown
Contributor

@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 commented May 7, 2022
edited
Loading

Copy link
Copy Markdown
Contributor Author

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.

mrahtz closed this May 7, 2022
mrahtz deleted the subst-fixes-2 branch May 8, 2022 11:03
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

2 participants


Back | FazBrowse Home | New Git URL