On Tue, Jun 19, 2018 at 3:52 AM, Juancarlo Añez <apal...@gmail.com> wrote: > >> The idea is to introduce new syntax for the list.append() method. >> >> >> Syntax: >> >> Variant 1. >> Use special case of index, namely omitted index: >> >> mylist[] = item > > > For all practical purpose, it would be enough to define that the expression: > > mylist += [item] > > > gets optimized to mylist.append(item).
From what I've read on SO about += ,there is not much penalty in comparison to append() when using one item. And besides, if your idea is to promote += [item] spelling instead of .append() method - then might be you have a totally different idea than mine - so probably start new discussion thread. I suspect though it has little sense because such spelling is imo nothing but obfuscation in terms of readability, and thankfully I haven't seen a lot of such usage. (and this all was many times discussed here too, so please not again) > > > -- > Juancarlo Añez _______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/