On Sat, Sep 26, 2020, 11:30 PM Greg Ewing <greg.ew...@canterbury.ac.nz> wrote:
> On 27/09/20 3:43 pm, Ricky Teachey wrote: > > telling people "either provide a default argument for > > both index AND value in your __setitem__ method, or neither" is also a > > perfectly legitimate way forward. > > Giving the value parameter of a __setitem__ a default seems like a > weird thing to do, since under normal circumstances it will never > get used. > > -- > Greg > I agree it's certainly weird. But it fixes the problem. And there's not much effort required.
_______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/3L2YND5SHAQKKUJIXUGB7J4F5MAHD2DE/ Code of Conduct: http://python.org/psf/codeofconduct/