Re:Python 3.7: Introducing Data Classes
by ianamartin on Thursday April 19, 2018 @02:14AM
(#16873712)
Oh, that makes sense. Not sure why this question rubbed people the wrong way. I was genuinely curious about when you would use an object as a key.
I guess my uses for dictionaries are pretty vanilla. But that’s a kind of thing I do all the time. I set up dictionaries where the key is a possible value from some operation or query, and the value is the function I want to perform on that value.
This extends that concept. Thanks!
--edit--
Makes python's lack of a switch operator sometimes less painful...