On Tue, Jun 12, 2018 at 5:54 PM, Mikhail V <mikhail...@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. _______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/