[New-bugs-announce] [issue23275] Can assign [] = (), but not () = []

Devin Jeanpierre report at bugs.python.org
Mon Jan 19 20:05:47 CET 2015


New submission from Devin Jeanpierre:

>>> [] = ()
>>> () = []
  File "<stdin>", line 1
SyntaxError: can't assign to ()

This contradicts the assignment grammar, which would make both illegal: https://docs.python.org/3/reference/simple_stmts.html#assignment-statements

----------
components: Interpreter Core
messages: 234324
nosy: Devin Jeanpierre
priority: normal
severity: normal
status: open
title: Can assign [] = (), but not () = []
type: behavior

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue23275>
_______________________________________


More information about the New-bugs-announce mailing list