A decorator to automatically detect mismatch when overriding a method.
Project description
overrides
========
.. image:: https://api.travis-ci.org/drorasaf/overrides.svg?branch=python3_support
:target: https://travis-ci.org/drorasaf/overrides
.. image:: https://coveralls.io/repos/drorasaf/overrides/badge.svg?branch=python3_support
:target: https://coveralls.io/r/drorasaf/overrides
.. image:: https://img.shields.io/pypi/v/overrides.svg
:target: https://pypi-hypernode.com/pypi/overrides
.. image:: https://img.shields.io/pypi/dm/overrides.svg
:target: https://pypi-hypernode.com/pypi/overrides
A decorator to automatically detect mismatch when overriding a method.
See http://stackoverflow.com/questions/1167617/in-python-how-do-i-indicate-im-overriding-a-method
Installation
------------
.. code-block:: bash
$ pip install overrides
Usage
-----
.. code-block:: python
from overrides import overrides
class SuperClass(object):
def method(self):
"""This is the doc for method and will be shown in subclass method too!"""
return 2
class SubClass(SuperClass):
@overrides
def method(self):
return 1
========
.. image:: https://api.travis-ci.org/drorasaf/overrides.svg?branch=python3_support
:target: https://travis-ci.org/drorasaf/overrides
.. image:: https://coveralls.io/repos/drorasaf/overrides/badge.svg?branch=python3_support
:target: https://coveralls.io/r/drorasaf/overrides
.. image:: https://img.shields.io/pypi/v/overrides.svg
:target: https://pypi-hypernode.com/pypi/overrides
.. image:: https://img.shields.io/pypi/dm/overrides.svg
:target: https://pypi-hypernode.com/pypi/overrides
A decorator to automatically detect mismatch when overriding a method.
See http://stackoverflow.com/questions/1167617/in-python-how-do-i-indicate-im-overriding-a-method
Installation
------------
.. code-block:: bash
$ pip install overrides
Usage
-----
.. code-block:: python
from overrides import overrides
class SuperClass(object):
def method(self):
"""This is the doc for method and will be shown in subclass method too!"""
return 2
class SubClass(SuperClass):
@overrides
def method(self):
return 1
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
overrides-1.8.tar.gz
(3.3 kB
view hashes)
Built Distribution
overrides-1.8-py2.7.egg
(7.2 kB
view hashes)