On Fri, Sep 25, 2020 at 3:36 PM Christopher Barker <python...@gmail.com>
wrote:

> On Fri, Sep 25, 2020 at 6:05 AM Ricky Teachey <ri...@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
_______________________________________________
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/HPWEBGP3L6MGA6GILDVAKZHUEQNGMHXO/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to