27 Sep
2020
27 Sep
'20
10:22 a.m.
On Sun, Sep 27, 2020 at 7:08 PM Steven D'Aprano <steve@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