Skip to content Skip to sidebar Skip to footer
Showing posts with the label Immutability

Making A List Subclass Hashable

I want to derive a class from list, add a few instance attributes to it, and make it hashable. What… Read more Making A List Subclass Hashable

How To Get An Arbitrary Element From A Frozenset?

I would like to get an element from a frozenset (without modifying it, of course, as frozensets are… Read more How To Get An Arbitrary Element From A Frozenset?

Hashing An Immutable Dictionary In Python

Short version: What's the best hashing algorithm for a multiset implemented as a dictionary of… Read more Hashing An Immutable Dictionary In Python

How To Get An Arbitrary Element From A Frozenset?

I would like to get an element from a frozenset (without modifying it, of course, as frozensets are… Read more How To Get An Arbitrary Element From A Frozenset?