[issue9080] Provide list prepend method (even though it's not efficient)
Ezio Melotti
report at bugs.python.org
Fri Jun 25 14:35:32 CEST 2010
Ezio Melotti <ezio.melotti at gmail.com> added the comment:
If we add a .prepend() method, people will see it and start using it. Since now there's no 'prepend' method people ask why, and the answer they usually get is "because it not a good idea to add elements on lists (but if you really have to use the 'insert' method)".
The symmetry should be in the use case, not (only) in the names, otherwise we should also have a method to pop from the beginning to complete the symmetry with append/pop.
If you are not convinced yet you could write to the python-ideas mailing list.
----------
nosy: +ezio.melotti
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9080>
_______________________________________
More information about the Python-bugs-list
mailing list