MCPcopy Create free account
hub / github.com/numpy/numpy / deprecate_with_doc

Function deprecate_with_doc

numpy/lib/utils.py:239–263  ·  view source on GitHub ↗

Deprecates a function and includes the deprecation in its docstring. This function is used as a decorator. It returns an object that can be used to issue a DeprecationWarning, by passing the to-be decorated function as argument, this adds warning to the to-be decorated function's

(msg)

Source from the content-addressed store, hash-verified

237
238
239def deprecate_with_doc(msg):
240 """
241 Deprecates a function and includes the deprecation in its docstring.
242
243 This function is used as a decorator. It returns an object that can be
244 used to issue a DeprecationWarning, by passing the to-be decorated
245 function as argument, this adds warning to the to-be decorated function's
246 docstring and returns the new function object.
247
248 See Also
249 --------
250 deprecate : Decorate a function such that it issues a `DeprecationWarning`
251
252 Parameters
253 ----------
254 msg : str
255 Additional explanation of the deprecation. Displayed in the
256 docstring after the warning.
257
258 Returns
259 -------
260 obj : object
261
262 """
263 return _Deprecate(message=msg)
264
265
266#--------------------------------------------

Callers

nothing calls this directly

Calls 1

_DeprecateClass · 0.85

Tested by

no test coverage detected