Skip to content

Meta module

Roberto Prevato edited this page Sep 21, 2019 · 1 revision

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

from essentials.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