how to test for atomicity/mutability/hashability?
clp2 at rebertia.com
Thu Oct 7 22:02:42 CEST 2010
On Thu, Oct 7, 2010 at 12:13 PM, kj <no.email at please.post> wrote:
> It would facilitate the implementation of t() to have a simple test
> for mutability. Is there one?
Non-default hashability is an approximate heuristic:
klass = type(x)
return klass is object or klass.__hash__ is not object.__hash__
More information about the Python-list