Message382163
I agree with Mark about slice hashing.
This looks like a deliberate design decision.
x[:] = [] should empty a sequence, not set the key-value pair (slice(None, None, None), []) in a mapping.
However, code-objects can still be hashable even if slices are not.
By leaving slices unhashable, and accounting for their presence in code.__hash__, we get both the performance improvement and full backwards compatibility. |
|
Date |
User |
Action |
Args |
2020-11-30 17:02:43 | Mark.Shannon | set | recipients:
+ Mark.Shannon, rhettinger, terry.reedy, mark.dickinson, christian.heimes, serhiy.storchaka, josh.r, pablogsal, BTaskaya |
2020-11-30 17:02:43 | Mark.Shannon | set | messageid: <1606755763.95.0.293419565747.issue42454@roundup.psfhosted.org> |
2020-11-30 17:02:43 | Mark.Shannon | link | issue42454 messages |
2020-11-30 17:02:43 | Mark.Shannon | create | |
|