On Wed, Aug 26, 2020 at 5:00 PM Stephen J. Turnbull < [email protected]> wrote:
> If the "keyword arguments in __getitem__" feature is added, .get() is > purely redundant. (Of course this thread would then become "make > 'default' a standard keyword argument for mutable collections.") > Is that something people want to do? Do people want to be able to write `my_dict[key, default=0]` instead of `my_dict.get(key, 0)`? What about `my_dict[key, default=None]` instead of `my_dict.get(key)`?
_______________________________________________ Python-ideas mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/[email protected]/message/5LW366TDX3SKJ2W6D6KCCJZBKSKZRU2W/ Code of Conduct: http://python.org/psf/codeofconduct/
