[docs] Clarify that list.insert / list.pop works with negative indexes

Attila-Mihaly Balazs dify.ltd at gmail.com
Thu Oct 27 04:14:27 EDT 2016


Both list.insert and list.pop support negative indexes and they behave just
like list[negative index]. IMHO this should be called out explicitly in the
documentation - ie:
https://docs.python.org/3.7/tutorial/datastructures.html#

Something like: "a.insert(-1, x) inserts before the last element"

Regards,
Attila
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/docs/attachments/20161027/3cedefdb/attachment.html>


More information about the docs mailing list