- tensorstore.Spec.__eq__(self, other: Spec) bool
Compares with another
Spec
for equality based on theJSON representation
.The comparison is based on the JSON representation, except that any bound context resources are compared by identity (not by their JSON representation).
Example
>>> spec = ts.Spec({'driver': 'n5', 'kvstore': {'driver': 'memory'}}) >>> assert spec == spec >>> a, b = spec.copy(), spec.copy() >>> context_a, context_b = ts.Context(), ts.Context() >>> a.update(context=context_a) >>> b.update(context=context_b) >>> assert a == a >>> assert a != b