Currently, if you attempt to unpack a length-3 tuple into 2 variables, we get this error.
I believe that if attempting to unpack a length-Unknown tuple into 2 variables, we should get a Tuple Size Mismatch; expected 2 but received unknown length error.
Example:
The following code does not throw a typing error currently,
This is because pydantic models have a tuple generator,
However, this tuple is of undefined length, so unpacking into (k, _) is inherently unsafe (And does actually crash the program in this case)
Currently, if you attempt to unpack a length-3 tuple into 2 variables, we get this error.
I believe that if attempting to unpack a length-Unknown tuple into 2 variables, we should get a
Tuple Size Mismatch; expected 2 but received unknown length
error.Example:
The following code does not throw a typing error currently,
This is because pydantic models have a tuple generator,
However, this tuple is of undefined length, so unpacking into
(k, _)
is inherently unsafe (And does actually crash the program in this case)