[Python-checkins] cpython (3.4): #20135: FAQ entry for list mutation. (See also 6375bf34fff6.)

r.david.murray python-checkins at python.org
Mon Sep 29 16:24:22 CEST 2014

changeset:   92623:138f54622841
branch:      3.4
parent:      92620:ab1570d0132d
user:        R David Murray <rdmurray at bitdance.com>
date:        Mon Sep 29 10:17:28 2014 -0400
  #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 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/Doc/faq/programming.rst b/Doc/faq/programming.rst
--- a/Doc/faq/programming.rst
+++ b/Doc/faq/programming.rst
@@ -473,7 +473,7 @@
 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``::

Repository URL: https://hg.python.org/cpython

More information about the Python-checkins mailing list