Skip to content

Unpack vs Expand #3527

Answered by JelleZijlstra
q0w asked this question in Q&A
Discussion options

You must be logged in to vote

Unpack[] was introduced by PEP 646 for *args. That is currently its only standardized use. An upcoming PEP, PEP 692, will allow using it for **kwargs too. Pyright already has experimental support for this feature.

Expand is a name that has been floating around in some proposals and in an unmerged mypy PR, but to my knowledge it has not been implemented in any type checkers. I do not expect it to become standardized.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by q0w
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants