
Hello, I was experimenting in the repl and I noticed something odd: slices are not hashable. I was wondering why this would be since, I would think slices are immutable, and most immutable objects are hashable. Thanks, Ed

On Sat, Jun 18, 2016 at 12:51 PM Ed Minnix <egregius313@gmail.com> wrote:
Apparently that was to avoid mistakes. Otherwise there would be a bit of confusion between assigning to a slice as the key or changing many keys. https://bugs.python.org/issue408326 http://stackoverflow.com/questions/29980786/why-are-slice-objects-not-hashab...

On Sat, Jun 18, 2016 at 12:51 PM Ed Minnix <egregius313@gmail.com> wrote:
Apparently that was to avoid mistakes. Otherwise there would be a bit of confusion between assigning to a slice as the key or changing many keys. https://bugs.python.org/issue408326 http://stackoverflow.com/questions/29980786/why-are-slice-objects-not-hashab...
participants (2)
-
Ed Minnix
-
Michael Selik