4 Jun
2019
4 Jun
'19
9:20 p.m.
Jeroen Demeyer writes:
When you think of it this way, it's not an unreasonable request. There would be at least one major use of this operator within CPython, for lists. With this proposal, the awkward syntax (there are 219 instances of this in the CPython sources)
L[:] = new_list
I'd rather not replace it. It's a perfectly Pythonic syntax, although it's a Python-specific idiom. It's an opportunity to see slice assignment in operation, which I would guess is relatively unusual in the general case. Steve