proposal for slice hashing

2020-05-11 Thread Will Bradshaw
I recently ran into a situation where I needed to hash a slice and found this to be unsupported. This seems silly as there is little benefit of slices not supporting hashing and large downsides. This coupled with the fact that one cannot subclass slices is a significant and needless annoyance.

Re: proposal for slice hashing

2020-05-11 Thread Will Bradshaw
On Monday, May 11, 2020 at 4:10:56 PM UTC-4, Chris Angelico wrote: > On Tue, May 12, 2020 at 6:01 AM Will Bradshaw wrote: > > The only options as of now are: > > 1. use 3 layers of wrappers to pack the slices into a custom type that > > supports hashing pass this m

Re: proposal for slice hashing

2020-05-11 Thread Will Bradshaw
On Monday, May 11, 2020 at 4:45:55 PM UTC-4, Chris Angelico wrote: > On Tue, May 12, 2020 at 6:31 AM Will Bradshaw wrote: > > > > On Monday, May 11, 2020 at 4:10:56 PM UTC-4, Chris Angelico wrote: > > > On Tue, May 12, 2020 at 6:01 AM Will Bradshaw > > > wrot

Re: proposal for slice hashing

2020-05-16 Thread Will Bradshaw
On Tuesday, May 12, 2020 at 5:51:37 PM UTC-4, Paul Rubin wrote: > Terry Reedy writes: > > Slice objects are similar to named tuples > > In that case making them hashable sounds like good sense. I mean I've already made and tested a patch it wasn't hard. I did same day as I made the post. I've a