Message390770
> I'm loathe to guarantee anything about this in the language itself.
There aren't language any guarantees being proposed. Letting the hash depend on the object id just helps avoid quadratic behavior. Making float('NaN') a singleton is also perfectly reasonable behavior for an immutable type. Neither is a guaranteed behavior, just a convenient one.
> I'm not convinced it addresses a real-world problem
Maybe yes, maybe no. I would hope that NaNs arising from bogus calculations would be rare. OTOH, they are commonly used for missing values in Pandas where internal dict/set operations abound. Either way, I would like to close off a trivially easy way to invoke quadratic behavior unexpectedly. |
|
Date |
User |
Action |
Args |
2021-04-11 05:27:17 | rhettinger | set | recipients:
+ rhettinger, tim.peters, mark.dickinson, serhiy.storchaka, congma |
2021-04-11 05:27:17 | rhettinger | set | messageid: <1618118837.6.0.0949170636892.issue43475@roundup.psfhosted.org> |
2021-04-11 05:27:17 | rhettinger | link | issue43475 messages |
2021-04-11 05:27:17 | rhettinger | create | |
|