On Sun, Sep 27, 2020 at 7:08 PM Steven D'Aprano <st...@pearwood.info> wrote:
> 1. Fill in a default index with one of:
>
> a. None
> b. empty tuple ()
> c. NotImplemented
> d. a new, unhashable builtin Missing or NoIndex
>
> 1d. avoids any chance of that, but requires a new builtin;
>

An interesting and very good point. I kinda like the idea that it
would cause an immediate exception if you use it with any of the
default types (by not being numeric or hashable), but it raises the
question "why isn't this hashable", since it would be unique and
immutable. Ultimately I don't think it's worth it, but the
unhashability WOULD be advantageous here.

I'm currently inclined towards the empty tuple option, myself.

ChrisA
_______________________________________________
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/DNYTKDK7GS5UEO7BH66CBG2NWYZGGLVX/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to