[issue17939] Misleading information about slice assignment in docs

2020-11-17 Thread Irit Katriel
Change by Irit Katriel : -- versions: +Python 3.10, Python 3.8, Python 3.9 -Python 3.3 ___ Python tracker ___ ___ Python-bugs-list m

[issue17939] Misleading information about slice assignment in docs

2013-05-10 Thread Terry J. Reedy
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)) print(a) >>> [0, 1, 2, 3, 2, 3] -- nosy:

[issue17939] Misleading information about slice assignment in docs

2013-05-08 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue17939] Misleading information about slice assignment in docs

2013-05-08 Thread Stefan Chrobot
New submission from Stefan Chrobot: http://docs.python.org/3/reference/simple_stmts.html#assignment-statements The docs says: "If the target is a slicing: The primary expression in the reference is evaluated. It should yield a mutable sequence object (such as a list). The assigned object shou