classification
Title: Incorrect documentation of replacement of slice of length 0
Type: behavior Stage: resolved
Components: Documentation Versions: Python 3.7
process
Status: closed Resolution:
Dependencies: Superseder:
Assigned To: docs@python Nosy List: docs@python, sjt
Priority: normal Keywords: easy

Created on 2017-04-22 17:24 by sjt, last changed 2017-04-22 17:29 by sjt. This issue is now closed.

Messages (2)
msg292127 - (view) Author: Stephen J. Turnbull (sjt) * (Python triager) Date: 2017-04-22 17:24
In section 4.6.3. "Mutable Sequence Types" of current documentation, Note 1 to the table says "[iterable] t must have the same length as the slice it is replacing." This is incorrect in the case of extension: s[len(s):] = t according to the rest of the documentation, as well as experiment.
msg292128 - (view) Author: Stephen J. Turnbull (sjt) * (Python triager) Date: 2017-04-22 17:29
Sorry, I just realized this note only applies to slices with a stride (k in i:j:k).  Closing.
History
Date User Action Args
2017-04-22 17:29:56sjtsetstatus: open -> closed

messages: + msg292128
stage: resolved
2017-04-22 17:24:09sjtcreate