{"action":"created","issue":{"url":"https://api.github.com/repos/python/mypy/issues/1888","repository_url":"https://api.github.com/repos/python/mypy","labels_url":"https://api.github.com/repos/python/mypy/issues/1888/labels{/name}","comments_url":"https://api.github.com/repos/python/mypy/issues/1888/comments","events_url":"https://api.github.com/repos/python/mypy/issues/1888/events","html_url":"https://github.com/python/mypy/issues/1888","id":165987251,"number":1888,"title":"Suggestion: Having an @override decorator","user":{"login":"shreydesai","id":12023280,"avatar_url":"https://avatars.githubusercontent.com/u/12023280?v=3","gravatar_id":"","url":"https://api.github.com/users/shreydesai","html_url":"https://github.com/shreydesai","followers_url":"https://api.github.com/users/shreydesai/followers","following_url":"https://api.github.com/users/shreydesai/following{/other_user}","gists_url":"https://api.github.com/users/shreydesai/gists{/gist_id}","starred_url":"https://api.github.com/users/shreydesai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shreydesai/subscriptions","organizations_url":"https://api.github.com/users/shreydesai/orgs","repos_url":"https://api.github.com/users/shreydesai/repos","events_url":"https://api.github.com/users/shreydesai/events{/privacy}","received_events_url":"https://api.github.com/users/shreydesai/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-07-17T17:47:07Z","updated_at":"2016-07-17T18:28:08Z","closed_at":"2016-07-17T18:27:36Z","body":"Is there any interest in providing an `@override` decorator for base classes that re-implement (override) the functions of abstract classes? It could be potentially helpful in distinguishing between the functions that are inherited vs. functions that are unique to a class.\r\n\r\n```python\r\nfrom abc import ABCMeta, abstractmethod\r\n\r\nclass A(metaclass=ABCMeta):\r\n    @abstractmethod\r\n    def f(self) -> None: pass\r\n\r\nclass B(A):\r\n    @override\r\n    def f(self) -> None:\r\n        print('Overridden function')\r\n    \r\n    def g(self) -> None:\r\n       print('Non-overridden function')\r\n```\r\n\r\nThere seem to be rough implementations of such a decorator here - [http://stackoverflow.com/questions/1167617/in-python-how-do-i-indicate-im-overriding-a-method](http://stackoverflow.com/questions/1167617/in-python-how-do-i-indicate-im-overriding-a-method). "},"comment":{"url":"https://api.github.com/repos/python/mypy/issues/comments/233196231","html_url":"https://github.com/python/mypy/issues/1888#issuecomment-233196231","issue_url":"https://api.github.com/repos/python/mypy/issues/1888","id":233196231,"user":{"login":"gvanrossum","id":2894642,"avatar_url":"https://avatars.githubusercontent.com/u/2894642?v=3","gravatar_id":"","url":"https://api.github.com/users/gvanrossum","html_url":"https://github.com/gvanrossum","followers_url":"https://api.github.com/users/gvanrossum/followers","following_url":"https://api.github.com/users/gvanrossum/following{/other_user}","gists_url":"https://api.github.com/users/gvanrossum/gists{/gist_id}","starred_url":"https://api.github.com/users/gvanrossum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gvanrossum/subscriptions","organizations_url":"https://api.github.com/users/gvanrossum/orgs","repos_url":"https://api.github.com/users/gvanrossum/repos","events_url":"https://api.github.com/users/gvanrossum/events{/privacy}","received_events_url":"https://api.github.com/users/gvanrossum/received_events","type":"User","site_admin":false},"created_at":"2016-07-17T18:28:08Z","updated_at":"2016-07-17T18:28:08Z","body":"No, python-ideas"}}
{"actor":{"display_login":"gvanrossum"}}