[Python-ideas] Alternative spelling for list.append()
Juancarlo Añez
apalala at gmail.com
Mon Jun 18 20:52:14 EDT 2018
> 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).
--
Juancarlo *Añez*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20180618/f469e1aa/attachment.html>
More information about the Python-ideas
mailing list