MCPcopy
hub / github.com/django/django / __hash__

Method __hash__

django/core/exceptions.py:236–247  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

234 return hash(self) == hash(other)
235
236 def __hash__(self):
237 if hasattr(self, "message"):
238 return hash(
239 (
240 self.message,
241 self.code,
242 make_hashable(self.params),
243 )
244 )
245 if hasattr(self, "error_dict"):
246 return hash(make_hashable(self.error_dict))
247 return hash(tuple(sorted(self.error_list, key=operator.attrgetter("message"))))
248
249
250class EmptyResultSet(Exception):

Callers

nothing calls this directly

Calls 1

make_hashableFunction · 0.90

Tested by

no test coverage detected