smpl_doc.doc.insert_doc
- smpl_doc.doc.insert_doc(original)[source]
Inserts the docstring from passed function
original
in thetarget
function docstring.Parameters
- original
class
orfunction
orignal.__doc__
is inserted to the__doc__
of thetarget
Examples
>>> def ho(): ... '''Ho''' ... print(ho.__doc__) >>> @insert_doc(ho) ... def hi(): ... '''Hi''' ... print(hi.__doc__) >>> hi() HoHi
- original