June 12, 2018
3:17 p.m.
On Tue, Jun 12, 2018 at 5:54 PM, Mikhail V <mikhailwas@gmail.com> wrote:
I think it would be logical to have the insert operator for lists. Similar to list extend operator += , it could use one of augmented assignment operators, e,g, /=.
L = ["aa"]
L[0] /= "bb"
-> ["bb", "aa"]
L[0] /= [1,2]
-> [[1,2], "aa"]
etc.
Without index it would work like append():
Oops Sorry for confusion, I inserted wrong examples here: The examples should be : L[0:0] /= "bb" L[0:0] /= [1,2] ... L[i:i] ^= e Of course. Because L[i] /= is an operation on list element, thus already working syntax.