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

Michel Desmoulin desmoulinmichel at gmail.com
Tue Feb 28 06:54:26 EST 2017

dict.get() is a very useful method, but for lists and tuples, we need to
rely on try/except instead.

Can we get list.get and tuple.get as well?

Also, for list, a list.setdefault like the dict.setdefault would be logical.

More information about the Python-ideas mailing list