Message26424
Logged In: YES
user_id=6656
Yuck, I agree that that's pretty icky. But the disassembly makes things
clear:
>>> dis.dis(compile('t[0] |= a', '', 'single'))
1 0 LOAD_NAME 0 (t)
3 LOAD_CONST 0 (0)
6 DUP_TOPX 2
9 BINARY_SUBSCR
10 LOAD_NAME 1 (a)
13 INPLACE_OR
14 ROT_THREE
15 STORE_SUBSCR
16 LOAD_CONST 1 (None)
19 RETURN_VALUE
In fact...
>>> s = set([1])
>>> t = (s,)
>>> t[0] |= set([2])
Traceback (most recent call last):
File "<stdin>", line 1, in ?
TypeError: object does not support item assignment
>>> s
set([1, 2])
>>>
Oof.
Not sure what to do about this. |
|
Date |
User |
Action |
Args |
2007-08-23 14:34:54 | admin | link | issue1306777 messages |
2007-08-23 14:34:54 | admin | create | |
|