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.
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to