What are hashable objects in Python

Опубликовано: 11 Октябрь 2024
на канале: Python Morsels
957
39

Sets and dictionaries are powered by hashability. And hashable objects tend to be immutable.

https://pym.dev/what-are-hashable-obj...

Find more Python screencasts at https://pym.dev/screencasts/

00:00 Sets items must be hashable
00:13 Dictionary keys must be hashable
00:24 Hashability makes dictionaries and sets fast
01:09 Every hashable object has a semi-unique hash value
01:57 Hashable objects are often immutable
02:10 Hashability is linked to equality
02:38 An object's hash value should never change
03:04 Summary