Issue1242

classification
Title: Tuples allow member assignment
Type: behaviour Severity: critical
Components: Core Versions: 2.5b1
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: fwierzbicki Nosy List: fwierzbicki, pchasco
Priority: Keywords:

Created on 2009-01-21.18:28:17 by pchasco, last changed 2009-01-23.01:07:53 by fwierzbicki.

Messages
msg4062 (view) Author: (pchasco) Date: 2009-01-21.18:28:17
Item assignment is allowed in jython 2.5b1. Reproduction:

>>> t = (1,)
>>> t[0] = 2
>>> print 2
2

Whereas CPython 2.5.2 produces the following:
>>> t = (1,)
>>> t[0] = 2
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: 'tuple' object does not support item assignment
>>>
msg4063 (view) Author: (pchasco) Date: 2009-01-21.18:29:56
Correction to reproduction...

>>> t = (1,)
>>> t[0] = 2
>>> print t
(2,)
msg4067 (view) Author: Frank Wierzbicki (fwierzbicki) Date: 2009-01-22.19:51:37
Wow, I can't believe the unit tests don't hit this one!  Thanks for
reporting!
msg4068 (view) Author: Frank Wierzbicki (fwierzbicki) Date: 2009-01-23.01:07:36
fixed in r5961 (and added a test)
History
Date User Action Args
2009-01-23 01:07:53fwierzbickisetresolution: accepted -> fixed
2009-01-23 01:07:39fwierzbickisetstatus: open -> closed
messages: + msg4068
2009-01-22 19:51:38fwierzbickisetassignee: fwierzbicki
messages: + msg4067
resolution: accepted
nosy: + fwierzbicki
severity: normal -> critical
2009-01-21 18:29:56pchascosetmessages: + msg4063
2009-01-21 18:28:17pchascocreate