I’ve got one! First, some context: This is normal assignment unpacking: >>> a, b = 1, 2 >>> [a, b] [1, 2] (Mismatch gives errors) >>> a, b = [1] ValueError >>> a, b = [1, 2, 3] ValueError Extra parentheses works too: >>> (a, b) = [2, 3] >>> [a, b] [2, 3] Unpacking a single value: >>> (a,) = [4] >>> a 4 Works without parentheses too: >>> a, = [5] >>> a 5 No values does not work: >>> , = [] SyntaxError Neither does emp…
This appears to no longer be the case in Python 3: $ python2 Python 2.7.13 (default, Jul 21 2017, 03:24:34) >>> () = [] File " ", line 1 SyntaxError: can't assign to () >>> $ python3 Python 3.6.2 (default, Jul 20 2017, 03:52:27) >>> () = [] >>>
It was fixed in Python 3.6 specifically, the error still occurs under 3.5.