[Python-ideas] Suggestion: push() method for lists
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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-ideas