In article <[email protected]>,
Duncan Booth <[email protected]> wrote:
> Is there any reason why tuples need to throw an exception on assigning to
> the element if the old value and new value are the same object?
>
> If I say:
>
> a = ("spam", [10, 30], "eggs")
>
> then
>
> a[0] = a[0]
>
> won't actually mutate the object. So tuples could let that silently pass.
But, why would you want them to? What a way to introduce bugs which are
difficult to test for.
--
https://mail.python.org/mailman/listinfo/python-list