Felix <fe...@meyerwolters.de> added the comment:

Thanks for the link! Interesting read.

I have to disagree with the statement that this is something that happens very 
rarely. Just have a look at the mess on stackoverflow alone (these are only the 
top results I got after a minute of googling):

https://stackoverflow.com/questions/5125619/why-doesnt-list-have-safe-get-method-like-dictionary

https://stackoverflow.com/questions/2492087/how-to-get-the-nth-element-of-a-python-list-or-a-default-if-not-available

https://stackoverflow.com/questions/2574636/getting-a-default-value-on-index-out-of-range-in-python

https://stackoverflow.com/questions/12186388/get-value-at-list-array-index-or-none-if-out-of-range-in-python

https://stackoverflow.com/questions/17721748/default-value-for-out-of-bounds-list-index

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue32979>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to