Skip to content
This repository has been archived by the owner on Dec 13, 2020. It is now read-only.

Meta module

Roberto Prevato edited this page Oct 27, 2018 · 1 revision

rocore meta module contains a decorator to mark functions as deprecated, and optionally throw exception:

from rocore.meta import DeprecatedException, deprecated


@deprecated()
def dep_method():
    pass


class Sad:

    @deprecated('Sad class is deprecated, don`t use', raise_exception=True)
    def __init__(self):
        pass
Clone this wiki locally