3.5. Typing Over

  • Signs that a method is overridden on purpose

  • It is not a mistake, that it has the same name as in base class

>>> from typing import override
>>>
>>>
>>> class Account:
...     def login(self):
...         ...
>>>
>>> class User(Account):
...     @override
...     def login(self):
...         print('ok')