Mark Dickinson added the comment:

@andy.chugunov: tuples are immutable in the sense that you can't put a new 
object into a tuple or remove objects from a tuple.  That doesn't mean that 
tuples can't contain mutable objects, or prevent you from mutating the objects 
inside a tuple.

So the append method call is fine:  it's not modifying the tuple itself (the 
tuple still has references to exactly the same objects both before and after 
the append call);  it's merely mutating one the objects inside the tuple.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue17973>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to