Opened 10 years ago

#7614 new Bugs

duplicate dosctring is generated for pure virtual methods

Reported by: tomer.spector@… Owned by: Ralf W. Grosse-Kunstleve
Milestone: To Be Determined Component: python USE GITHUB
Version: Boost 1.47.0 Severity: Problem
Keywords: Cc:

Description

When defining a method through "def" and using "pure_virtual" (see below) the given docstring is duplicated in the result python definition.

C++ class with pure-virtual method: =================================== class IOperation { public:

virtual string AsString() = 0;

}

The wrapper to expose it to Python: =================================== class_<IOperation, boost::noncopyable, boost::shared_ptr<IOperation> >("IOperation",

"docstring for class", no_init)

.def("AsString",

pure_virtual(&IOperation::AsString), "docstring for method AsString")

;

Result python class definition: =============================== class IOperation(instance):

""" docstring for class """

def AsString(self):

""" docstring

docstring """ pass

Change History (0)

Note: See TracTickets for help on using tickets.