Author Mark.Shannon
Recipients BTaskaya, Mark.Shannon, christian.heimes, josh.r, mark.dickinson, pablogsal, rhettinger, serhiy.storchaka, terry.reedy
Date 2020-11-30.17:02:43
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
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:43Mark.Shannonsetrecipients: + Mark.Shannon, rhettinger, terry.reedy, mark.dickinson, christian.heimes, serhiy.storchaka, josh.r, pablogsal, BTaskaya
2020-11-30 17:02:43Mark.Shannonsetmessageid: <>
2020-11-30 17:02:43Mark.Shannonlinkissue42454 messages
2020-11-30 17:02:43Mark.Shannoncreate