Submit
Path:
~
/
/
proc
/
thread-self
/
root
/
opt
/
alt
/
python35
/
lib64
/
python3.5
/
site-packages
/
sklearn
/
utils
/
__pycache__
/
File Content:
deprecation.cpython-35.opt-1.pyc
��(Xq � @ s/ d d l Z d g Z Gd d � d e � Z d S)� N� deprecatedc @ sU e Z d Z d Z d d d � Z d d � Z d d � Z d d � Z d d � Z d S)r a3 Decorator to mark a function or class as deprecated. 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 sklearn.utils import deprecated >>> deprecated() # doctest: +ELLIPSIS <sklearn.utils.deprecation.deprecated object at ...> >>> @deprecated() ... def some_function(): pass � c C s | | _ d S)zx Parameters ---------- extra: string to be added to the deprecation messages N)�extra)�selfr � r �/deprecation.py�__init__ s zdeprecated.__init__c C s- t | t � r | j | � S| j | � Sd S)N)� isinstance�type�_decorate_class� _decorate_fun)r �objr r r �__call__% s zdeprecated.__call__c sy d | j � | j r'