
Sept. 27, 2020
3:32 a.m.
On Sat, Sep 26, 2020, 11:30 PM Greg Ewing <greg.ewing@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.