| 411 | |
| 412 | |
| 413 | class KeyStr(str): |
| 414 | def __hash__(self): |
| 415 | if HashKey._crasher is not None and HashKey._crasher.error_on_hash: |
| 416 | raise HashingError |
| 417 | return super().__hash__() |
| 418 | |
| 419 | def __eq__(self, other): |
| 420 | if HashKey._crasher is not None and HashKey._crasher.error_on_eq: |
| 421 | raise EqError |
| 422 | return super().__eq__(other) |
| 423 | |
| 424 | |
| 425 | class HaskKeyCrasher: |
no outgoing calls