This module defines all the import used in wralea declarations
Decorator that replace a function's docstring by another from obj
This function should be used to decorate your wralea functions when docstring is equivalent to an already existing function or class.
Parameters: | obj -- a function or class that contains a docstring |
---|---|
Example: |
from math import abs
@add_docstring(abs)
def int_abs_function(x):
if type(x) == int:
return abs(x)
else:
raise TypeError("expect int as parameter")