Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Doc/library/stdtypes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1010,11 +1010,11 @@ operations have the same priority as the corresponding numeric operations. [3]_
| ``x not in s`` | ``False`` if an item of *s* is | \(1) |
| | equal to *x*, else ``True`` | |
+--------------------------+--------------------------------+----------+
| ``s + t`` | the concatenation of *s* and | (6)(7) |
| ``s + t`` or ``s += t`` | the concatenation of *s* and | (6)(7) |
| | *t* | |
+--------------------------+--------------------------------+----------+
| ``s * n`` or | equivalent to adding *s* to | (2)(7) |
| ``n * s`` | itself *n* times | |
| ``n * s`` or ``s *= n`` | itself *n* times | |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think the second form is an equivalent of n * s. Ditto for concatenation.

Rather you could extend the footnote to mention that some sequence types have support for in-place concatenation (or repetition).

CC @StanFromIreland

+--------------------------+--------------------------------+----------+
| ``s[i]`` | *i*\ th item of *s*, origin 0 | (3)(8) |
+--------------------------+--------------------------------+----------+
Expand Down
Loading