Message365844
I think the error messages could be improved.
In the first example: `f,x, a, b = [1,2,3]`
you are unpacking three values, but you need to unpack 4. The error message is not very helpful: 5 values is "more than 3" but it would be too many, you need not "more than 3" but exactly 4.
In the second example `a, b = [1,2,3]` it would be nice if it would tell you how many values you need to unpack.
Ideally, the message would say something like:
Need to unpack 4 values but got 3 # first example
Need to unpack 2 values but got 3 # second example
However I don't know if this is possible with the current parser, it might not be possible until the parser is changed (maybe in 3.9?) |
|
Date |
User |
Action |
Args |
2020-04-06 09:51:57 | steven.daprano | set | recipients:
+ steven.daprano, docs@python, Jacob RR |
2020-04-06 09:51:57 | steven.daprano | set | messageid: <1586166717.15.0.36997173033.issue40202@roundup.psfhosted.org> |
2020-04-06 09:51:57 | steven.daprano | link | issue40202 messages |
2020-04-06 09:51:57 | steven.daprano | create | |
|