Message249485
I agree that the table entry could be made more precise. I would suggest replacing the table entry with "equivalent to adding s to itself n times". This formulation serves to explain *why* the multiply operation works the way it does:
>>> a = [1, []]
>>> b = a * 4
>>> c = a + a + a + a
>>> b
[1, [], 1, [], 1, [], 1, []]
>>> c
[1, [], 1, [], 1, [], 1, []]
>>> a.append(2)
>>> a
[1, [], 2]
>>> b
[1, [], 1, [], 1, [], 1, []]
>>> c
[1, [], 1, [], 1, [], 1, []]
>>> a[1].append(3)
>>> a
[1, [3], 2]
>>> b
[1, [3], 1, [3], 1, [3], 1, [3]]
>>> c
[1, [3], 1, [3], 1, [3], 1, [3]]
I don't think it is appropriate to put an example in the table; IMO that belongs in the footnote where it currently is. You could hyperlink the table entry to the FAQ entry, though. |
|
Date |
User |
Action |
Args |
2015-09-01 15:54:15 | r.david.murray | set | recipients:
+ r.david.murray, georg.brandl, steven.daprano, docs@python, matheus.v.portela, Abraham.Smith |
2015-09-01 15:54:15 | r.david.murray | set | messageid: <1441122855.25.0.170703722493.issue23406@psf.upfronthosting.co.za> |
2015-09-01 15:54:15 | r.david.murray | link | issue23406 messages |
2015-09-01 15:54:15 | r.david.murray | create | |
|