On Sat, Jun 16, 2018 at 9:42 AM, Mikhail V <mikhail...@gmail.com> wrote: > Now I have slightly different idea. How is about special-casing of this > as a shortcut for append: > > L[] = item > > Namely just use the fact that empty slice is SyntaxError now. > > I understand this is totally different approach than operator > overloading and maybe > hard to implement, but I feel like it looks really appealing. > And it is quite intuitive imo. For me the syntax reads like: > "add new empty element and this element will be "item". > > No?
Yes, if this were PHP. I still haven't seen any compelling argument against the append method. -1 on introducing a new way to spell append. ChrisA _______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/