Boost C++ Libraries: Ticket #1460: Python classes with multiple bases are convertible only to the first class in the lists (even if super(classname, self).__init__() is called) https://svn.boost.org/trac10/ticket/1460 <p> first reported here: <a class="ext-link" href="http://mail.python.org/pipermail/c++-sig/2007-October/012926.html"><span class="icon">​</span>http://mail.python.org/pipermail/c++-sig/2007-October/012926.html</a> </p> <pre class="wiki">C++: #include &lt;boost/python.hpp&gt; namespace bp = boost::python; struct A { }; struct B { }; void test_A(const A &amp;) { } void test_B(const B &amp;) { } BOOST_PYTHON_MODULE(multiple_inheritance) { bp::def("test_A", &amp;test_A); bp::def("test_B", &amp;test_B); bp::class_&lt;A&gt;("A", bp::init&lt;&gt;()); bp::class_&lt;B&gt;("B", bp::init&lt;&gt;()); } Python: class C(A, B): pass test_A(C()) test_B(C()) And I get: Traceback (most recent call last): File "./multiple_inheritance.py", line 10, in &lt;module&gt; test_B(C()) Boost.Python.ArgumentError: Python argument types in multiple_inheritance.test_B(C) did not match C++ signature: test_B(B) </pre><p> I will try to figure it out once I am done with the exceptions. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/1460 Trac 1.4.3 Piotr Jaroszyński <p.jaroszynski@…> Sun, 18 Nov 2007 13:44:50 GMT <link>https://svn.boost.org/trac10/ticket/1460#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/1460#comment:1</guid> <description> <p> bleh, I wanted to choose the Python component. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Marshall Clow</dc:creator> <pubDate>Tue, 20 Nov 2007 23:21:56 GMT</pubDate> <title>component changed; owner set https://svn.boost.org/trac10/ticket/1460#comment:2 https://svn.boost.org/trac10/ticket/1460#comment:2 <ul> <li><strong>owner</strong> set to <span class="trac-author">Dave Abrahams</span> </li> <li><strong>component</strong> <span class="trac-field-old">None</span> → <span class="trac-field-new">Python</span> </li> </ul> Ticket troy d. straszheim Thu, 24 Sep 2009 17:13:43 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/1460#comment:3 https://svn.boost.org/trac10/ticket/1460#comment:3 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">invalid</span> </li> </ul> <p> You have to initialize your base classes in the derived object's constructor. I committed a passing test to git, will work its way into svn eventually: </p> <p> <a class="ext-link" href="http://gitorious.org/~straszheim/boost/straszheim/commit/ec9c7f7b48a40bf8136597242457f40a349b2fe3"><span class="icon">​</span>http://gitorious.org/~straszheim/boost/straszheim/commit/ec9c7f7b48a40bf8136597242457f40a349b2fe3</a> </p> Ticket AnyOldName3 Wed, 02 May 2018 13:22:42 GMT status, summary changed; resolution deleted https://svn.boost.org/trac10/ticket/1460#comment:4 https://svn.boost.org/trac10/ticket/1460#comment:4 <ul> <li><strong>status</strong> <span class="trac-field-old">closed</span> → <span class="trac-field-new">reopened</span> </li> <li><strong>resolution</strong> <span class="trac-field-deleted">invalid</span> </li> <li><strong>summary</strong> <span class="trac-field-old">Python classes with multiple bases are convertible only to the first class in the lists</span> → <span class="trac-field-new">Python classes with multiple bases are convertible only to the first class in the lists (even if super(classname, self).__init__() is called)</span> </li> </ul> <p> I made a detailed comment explaining why I think this issue should be reexamined, but the spam filter ate it. Hopefully, an admin can approve it. </p> Ticket