From 12dc0d96e0b32f3ee0aeba2e93994ff5e11bec29 Mon Sep 17 00:00:00 2001 From: R David Murray Date: Mon, 29 Sep 2014 10:17:28 -0400 Subject: #20135: FAQ entry for list mutation. (See also 6375bf34fff6.) I accidentally committed this in 6375bf34fff6; this changeset addresses the last review comments on the patch. This is a perennial question and something someone opens a ticket for probably every other month or so, so I'm surprised we didn't already have a FAQ entry for it. The original patch was written by M. Votz, refined first by Ezio Melotti and further refined by me. --- Doc/faq/programming.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Doc') diff --git a/Doc/faq/programming.rst b/Doc/faq/programming.rst index abadc954b4..ffb7e8b13b 100644 --- a/Doc/faq/programming.rst +++ b/Doc/faq/programming.rst @@ -473,7 +473,7 @@ There are two factors that produce this result: After the call to :meth:`~list.append`, the content of the mutable object has changed from ``[]`` to ``[10]``. Since both the variables refer to the same -object, accessing either one of them accesses the modified value ``[10]``. +object, using either name accesses the modified value ``[10]``. If we instead assign an immutable object to ``x``:: -- cgit v1.2.1