[Python-ideas] Suggestion: push() method for lists
Juancarlo Añez
apalala at gmail.com
Sun May 21 22:27:34 EDT 2017
On Sun, May 21, 2017 at 10:43 AM, Paul Laos <paul_laos at outlook.com> wrote:
> By default push(obj) would insert an object to the end of the list, while
> push(obj, index) would insert the object at index, just like pop() removes
> (and returns) the object at the end of the list, and pop(index) removes
> (and returns) the object at the index.
The name asymmetry between .pop() and .append() has always bothered me.
Cheers!
--
Juancarlo *Añez*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20170521/5d66d068/attachment.html>
More information about the Python-ideas
mailing list