# mne.utils.deprecated¶

class mne.utils.deprecated(extra='')[source]

Mark a function or class as deprecated (decorator).

Issue a warning when the function is called/the class is instantiated and adds a warning to the docstring.

The optional extra argument will be appended to the deprecation message and the docstring. Note: to use this with the default value for extra, put in an empty of parentheses:

>>> from mne.utils import deprecated
>>> deprecated()
<mne.utils.docs.deprecated object at ...>

>>> @deprecated()
... def some_function(): pass

Parameters
extra: string

To be added to the deprecation messages.

Methods

 Return hash(self).
__hash__(/)

Return hash(self).