
On Fri, Sep 25, 2020 at 3:36 PM Christopher Barker <pythonchb@gmail.com> wrote:
On Fri, Sep 25, 2020 at 6:05 AM Ricky Teachey <ricky@teachey.org> wrote:
I'd like to hear more about why the empty tuple has been selected as the default index.
It makes sense to me: if more than one index is passed, they are passed as a tuple. so many classes need to handle tuples anyway.
What other options are there? I suppose None is a possibility, but None is a valid dict key, so probably not a great idea. Hmm, so is an empty tuple. Darn.
I think having no default is a better option, as someone pointed out already in this thread.
-CHB
That is where my thinking went as well, but I probably haven't thought through all the implications. Essentially, you'd be letting the write of the __XXXitem__ method(s) choose the default, rather than making the decision for them. --- Ricky. "I've never met a Kentucky man who wasn't either thinking about going home or actually going home." - Happy Chandler