New submission from Kees Bos <k....@zx.nl>: compiler.parse("d[1] = 1") should have a single tuple as subs
>>> compiler.parse("d[1] = 1") Module(None, Stmt([Assign([Subscript(Name('d'), 'OP_ASSIGN', [Const(1)])], Const(1))])) >>> compiler.parse("d[1,] = 2") Module(None, Stmt([Assign([Subscript(Name('d'), 'OP_ASSIGN', [Const(1)])], Const(2))])) >>> compiler.parse("d[1,2] = 3") Module(None, Stmt([Assign([Subscript(Name('d'), 'OP_ASSIGN', [Const(1), Const(2)])], Const(3))])) >>> compiler.parse("d[(1,)] = 2") Module(None, Stmt([Assign([Subscript(Name('d'), 'OP_ASSIGN', [Tuple([Const(1)])])], Const(2))])) ---------- components: Library (Lib) files: compiler.transformer.patch keywords: patch messages: 93034 nosy: kees severity: normal status: open title: compiler.transformer dict key bug d[1,] = 1 type: behavior versions: Python 2.5, Python 2.6 Added file: http://bugs.python.org/file14957/compiler.transformer.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue6978> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com