[Boost-bugs] [Boost C++ Libraries] #7614: duplicate dosctring is generated for pure virtual methods

Subject: [Boost-bugs] [Boost C++ Libraries] #7614: duplicate dosctring is generated for pure virtual methods
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-10-31 07:41:35


#7614: duplicate dosctring is generated for pure virtual methods
-------------------------------------+--------------------------------------
 Reporter: tomer.spector@… | Owner: rwgk
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: Python
  Version: Boost 1.47.0 | Severity: Problem
 Keywords: |
-------------------------------------+--------------------------------------
 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

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/7614>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:11 UTC