+ 1

What is hashable and mutable in python ?

What is the main difference between hashable and mutable in python ?

1st Jul 2019, 2:30 PM
Deepak Bhamla
Deepak Bhamla - avatar
5 Antworten
+ 2
Seb TheS if i'm not mistaken, you've defined immutable not mutable. [FIXED] Deepak Bhamla Mutable are those that can be changed and modified (e.g: lists in python). Hashable objects are fixed values objects, all hashable objects are immutables but not all immutables are hashable objects. (e.g: dictionary keys are hashable, tuples are "usually" hashables). -My definitions and examples are mainly python.
1st Jul 2019, 4:52 PM
Mo Hani
Mo Hani - avatar
+ 3
Mo Hani thsnks
1st Jul 2019, 6:33 PM
Deepak Bhamla
Deepak Bhamla - avatar
+ 2
Mo Hani fixed
1st Jul 2019, 4:57 PM
Seb TheS
Seb TheS - avatar
+ 1
Same here
1st Jul 2019, 2:49 PM
Bug!
Bug! - avatar
+ 1
Mutable object is an object, whose values can be changed its after object's creation. I don't know what is hashable, hashtable? Hashtable is an array, whose values can be indexed with keys of any datatype.
1st Jul 2019, 3:45 PM
Seb TheS
Seb TheS - avatar