On Fri, Apr 1, 2011 at 18:44, Hussain Bohra <hussainbohra...@yahoo.com> wrote:
> Atleast on changing list, you gets an exception.
>
> On updating dictionary living inside tuple wont throw an exception as well.
>
I thought the surprising part was that it threw an exception, not that
it updated the list.  Even more surprising was that it threw the
exception and updated the list too.

>>> a, b = 1, [2, 3, 4]
>>> foo = (a, b)
>>> b += [5]
>>> foo
(1, [2, 3, 4, 5])
>>>



-- 
http://about.me/rosh
_______________________________________________
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers

Reply via email to