[docs] [issue17939] Misleading information about slice assignment in docs

Terry J. Reedy report at bugs.python.org
Fri May 10 21:45:39 CEST 2013

Terry J. Reedy added the comment:

Since range objects have a known length, that example is not enough to show 'any iterable'. However, generators do not even have a __length_hint__ and they work too.

a = [1,2,3]
a[0:1] = (i for i in range(4))
[0, 1, 2, 3, 2, 3]

nosy: +terry.reedy

Python tracker <report at bugs.python.org>

More information about the docs mailing list