[Python-ideas] get() method for list and tuples

Markus Meskanen markusmeskanen at gmail.com
Fri Mar 3 21:25:16 EST 2017


Hi,

I'm still new here, but if my vote has any value then this gets a heavy -1
from me. It makes no sense to have to access exact i:th element of a list
without knowing if it exists, at least not in a scenario where checking
against the length or using an exception (say CSV row should have index 2
but doesn't) wouldn't be better.

I might've missed a message or two, but unless someone can provide a real
example where get() has an actual use case, I see no reason to argue over
this.

- Markus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20170304/7dec5e32/attachment.html>


More information about the Python-ideas mailing list