smpl_doc.doc.insert_doc
- smpl_doc.doc.insert_doc(original)[source]
Inserts the docstring from passed function
originalin thetargetfunction docstring.Parameters
- original
classorfunction 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