Docstring updates and tweaks for epydoc
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27016 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -39,11 +39,32 @@ _core_._wxPySetDictionary(vars())
|
||||
%#// be used here.
|
||||
import sys as _sys
|
||||
wx = _sys.modules[__name__]
|
||||
}
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
%pythoncode {
|
||||
%#----------------------------------------------------------------------------
|
||||
|
||||
def _deprecated(callable, msg=None):
|
||||
"""
|
||||
Create a wrapper function that will raise a DeprecationWarning
|
||||
before calling the callable.
|
||||
"""
|
||||
if msg is None:
|
||||
msg = "%s is deprecated" % callable
|
||||
def deprecatedWrapper(*args, **kwargs):
|
||||
import warnings
|
||||
warnings.warn(msg, DeprecationWarning, stacklevel=2)
|
||||
return callable(*args, **kwargs)
|
||||
deprecatedWrapper.__doc__ = msg
|
||||
return deprecatedWrapper
|
||||
|
||||
|
||||
%#----------------------------------------------------------------------------
|
||||
}
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Include all the files that make up the core module
|
||||
|
Reference in New Issue
Block a user