If your code type checks and you don't have `Any` or `# type: ignore` then you won't get type errors at runtime.

Right?

Wrong...

```py
x: object = []
hash(x)
```

This code type checks but raises a `TypeError` at runtime...

What's going on here?

Is this a β€œproblem” with the OOP hierarchy, because subclasses of `object` may not implement `__hash__` and actively disallow the usage of `object.__hash__` as a fallback?

It's late here, so maybe I'm just overlooking something really simple?

0

If you have a fediverse account, you can quote this note from your own instance. Search https://fosstodon.org/users/mathsppblog/statuses/115901608706078294 on your instance and quote it. (Note that quoting is not supported in Mastodon.)