In article <XnsA2E95FA1E1EB6duncanbooth@127.0.0.1>,
 Duncan Booth <duncan.booth@invalid.invalid> 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

Reply via email to