This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author steven.daprano
Recipients Abraham.Smith, docs@python, georg.brandl, matheus.v.portela, r.david.murray, steven.daprano
Date 2015-09-01.02:14:48
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <20150901021154.GC19373@ando.pearwood.info>
In-reply-to <1441060566.16.0.709227780404.issue23406@psf.upfronthosting.co.za>
Content
Which note are you referring to? There are at least two mentioned in 
this thread, the FAQ and a footnote in the docs for stdtypes.

If you're referring to the table of operations just below these:

https://docs.python.org/2/library/stdtypes.html#sequence-types-str-unicode-list-tuple-bytearray-buffer-xrange

https://docs.python.org/3/library/stdtypes.html#common-sequence-operations

where the docs say:

	s * n, n * s	n shallow copies of s concatenated

I think that could be worded better. It is too easy to misread it 
as saying that the items of s are copied (as I just did now, despite 
knowing that they aren't). I would word it:

	repeat s n times and concatenate

which matches the common name of * as the sequence repetition operator, 
and avoids using the word prone to misinterpretation, "copy".

Given how error-prone sequence repetition is, I'd add an example 
directly in the table:

for example, [x]*3 returns [x, x, x] (note that x is not copied).
History
Date User Action Args
2015-09-01 02:14:49steven.dapranosetrecipients: + steven.daprano, georg.brandl, r.david.murray, docs@python, matheus.v.portela, Abraham.Smith
2015-09-01 02:14:49steven.dapranolinkissue23406 messages
2015-09-01 02:14:48steven.dapranocreate