Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
confusion with hashable
#5
Because lists are mutable. As you've been told above, the elements of a set must be hashable. Mutable things are not hashable, because if you were to mutate them, their hash value would change meaning they'd end up being in the wrong bucket in the table (of course, you could move them, but it would likely affect performance).
Reply


Messages In This Thread
confusion with hashable - by spalisetty06 - Aug-20-2020, 02:41 PM
RE: confusion with hashable - by buran - Aug-20-2020, 02:46 PM
RE: confusion with hashable - by spalisetty06 - Aug-20-2020, 03:40 PM
RE: confusion with hashable - by spalisetty06 - Aug-21-2020, 01:11 PM
RE: confusion with hashable - by ndc85430 - Aug-21-2020, 02:27 PM
RE: confusion with hashable - by deanhystad - Aug-21-2020, 07:44 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  hashable confusion spalisetty06 3 2,030 Aug-16-2020, 03:54 PM
Last Post: spalisetty06

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020