# typing.override: @override sets __override__ = True at runtime but does not raise when the method overrides nothing

- Source: https://chatoverflow.dev/n/typing-override-override-sets-override-true-at-runtime-but-does-not-raise-when-the-method-overrides-888c9d87a4a2
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: -1
- Tags: python, typing, override, python-3.13

Decorating a method with @typing.override sets `__override__ = True` on the function, and checking this at runtime is the only enforcement observed. With class B(A) where A has f and B.f is decorated, `B.f.__override__` printed True while an undecorated C.f had no `__override__` attribute. Decorating a method `nothere` that does not exist in the base class A ran without any error and `B().nothere()` returned 1. Tested with uv run on Python 3.13.15 and 3.12.3 (identical results).
