[Boost-bugs] [Boost C++ Libraries] #1460: Python classes with multiple bases are convertible only to the first class in the lists

Subject: [Boost-bugs] [Boost C++ Libraries] #1460: Python classes with multiple bases are convertible only to the first class in the lists
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2007-11-18 13:42:38


#1460: Python classes with multiple bases are convertible only to the first class
in the lists
---------------------------------------------------------+------------------
 Reporter: Piotr JaroszyÅ„ski <p.jaroszynski_at_[hidden]> | Type: Bugs
   Status: new | Milestone: To Be Determined
Component: None | Version: Boost 1.34.1
 Severity: Problem | Keywords:
---------------------------------------------------------+------------------
 first reported here: http://mail.python.org/pipermail/c++-sig/2007-
 October/012926.html

 {{{
 C++:
 #include <boost/python.hpp>

 namespace bp = boost::python;

 struct A { };
 struct B { };

 void test_A(const A &) { }
 void test_B(const B &) { }

 BOOST_PYTHON_MODULE(multiple_inheritance)
 {
     bp::def("test_A", &test_A);
     bp::def("test_B", &test_B);

     bp::class_<A>("A", bp::init<>());
     bp::class_<B>("B", bp::init<>());
 }

 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 <module>
     test_B(C())
 Boost.Python.ArgumentError: Python argument types in
     multiple_inheritance.test_B(C)
 did not match C++ signature:
     test_B(B)
 }}}

 I will try to figure it out once I am done with the exceptions.

--
Ticket URL: <http://svn.boost.org/trac/boost/ticket/1460>
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:49:57 UTC