[Python-bugs-list] [ python-Bugs-757818 ] tuple assignment -- SystemError: unknown opcode
SourceForge.net
noreply@sourceforge.net
Fri, 20 Jun 2003 04:19:15 -0700
Bugs item #757818, was opened at 2003-06-20 07:19
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=757818&group_id=5470
Category: Python Interpreter Core
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Mark J (average)
Assigned to: Nobody/Anonymous (nobody)
Summary: tuple assignment -- SystemError: unknown opcode
Initial Comment:
Python 2.3b1 (#2, Jun 4 2003, 03:08:06)
[GCC 3.2.2 20030222 (Red Hat Linux 3.2.2-5)] on linux2
>>> i,j = True and (1, -1) or (-1, 1)
XXX lineno: 1, opcode: 0
Traceback (most recent call last):
File "<stdin>", line 1, in ?
SystemError: unknown opcode
>>> i,j = True and (1, -1) #works
>>> True and (1, -1) or (-1, 1) #also works
(1, -1)
>>> i,j = (1, -1) or (-1, 1) #nope
XXX lineno: 1, opcode: 0
Traceback (most recent call last):
File "<stdin>", line 1, in ?
SystemError: unknown opcode
>>> i,j = False and (1, -1) or (-1, 1) #works
>>> i,j
(-1, 1)
Thanks guys!
Mark
P.S. -1 on keyword initialization of dictionary (Liskov)
P.P.S. +1 on adding keys from iterable
$0.02 (*clink*)
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=757818&group_id=5470