[BangPypers] Nice "feature"

Noufal Ibrahim noufal at gmail.com
Fri Apr 1 14:47:47 CEST 2011


Came across this at PyCon. Comments?

>>> foo = (1,[2,3,4])
>>> foo[1] += [6]
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: 'tuple' object does not support item assignment
>>> foo
(1, [2, 3, 4, 6])
>>> 

-- 


More information about the BangPypers mailing list