[issue38516] PEP 3132 -- Extended Iterable Unpacking inconsistent assignment of * variable

2019-10-18 Thread Steven D'Aprano
Steven D'Aprano added the comment: Why would they give the same result when the code is different? #1 assign c, d, e and everything left over goes into b *b, c, d, e, = [1, 2, 3, 4] #2 assign c, d and everything left over goes into b *b, c, d, = [1, 2, 3, 4] #3 assign c a

[issue38516] PEP 3132 -- Extended Iterable Unpacking inconsistent assignment of * variable

2019-10-18 Thread Michael Jaquier
New submission from Michael Jaquier : x = [1,2,3] Case (1) *b, = x *b == [1, 2, 3] Case(2) *b, _ = x b = [1,2] Is it not more logical for this to give consistent values regardless. i.e., *b, = [1,2,3] ; b == [1,2] *b, _ = [1,3,2] ; b == [1,2] ; _ == [3] -- components: Libra