[C++-sig] AttributeError: 'Boost.Python.StaticProperty' object attribute '__doc__' is read-only
VáclavŠmilauer
eudoxos at arcig.cz
Sun Aug 30 09:40:15 CEST 2009
Such is the shortest example I am able to isolate (nothing py++ specific).
Should I report that as bug? Against boost::python?
I hope some expert will be able to comment on that.
----
$ cat foo.cc
#include<boost/python.hpp>
struct Foo{
static int bar;
};
int Foo::bar=3;
BOOST_PYTHON_MODULE(foo){
boost::python::class_<Foo>("Foo",boost::python::init<>())
.def_readonly("bar",Foo::bar);
}
$ g++ -o foo.so -I/usr/include/python2.6 -fPIC -shared -lboost_python-mt foo.cc
$ PYTHONPATH=. python -c 'import foo'
Traceback (most recent call last):
File "<string>", line 1, in <module>
AttributeError: 'Boost.Python.StaticProperty' object attribute '__doc__'
is read-only
More information about the Cplusplus-sig
mailing list