[C++-sig] AttributeError: 'Boost.Python.StaticProperty' object attribute 'doc' is read-only (original) (raw)
Renato Araujo renatox at gmail.com
Mon Aug 31 15:00:38 CEST 2009
- Previous message: [C++-sig] AttributeError: 'Boost.Python.StaticProperty' object attribute '__doc__' is read-only
- Next message: [C++-sig] please add python::raw_constructor
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi guys,
Searching in karmic patch for python 2.6, I found this one which touch in doc attributes of python objects. (http://pastebin.com/m4d8008fa). I did not test if removing this boost will works fine. For fix this I did a little change removing the use of def_readonly("bar",Foo::bar) to add_property("bar", setter_property_bar).
I will try find the problem in boost source but for now this change can solve the problem.
BR Renato Araujo Oliveira Filho
On Sun, Aug 30, 2009 at 4:40 AM, VáclavŠmilauer<eudoxos at arcig.cz> wrote:
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; BOOSTPYTHONMODULE(foo){ boost::python::class("Foo",boost::python::init<>()) .defreadonly("bar",Foo::bar); } $ g++ -o foo.so -I/usr/include/python2.6 -fPIC -shared -lboostpython-mt foo.cc $ PYTHONPATH=. python -c 'import foo' Traceback (most recent call last): File "", line 1, in AttributeError: 'Boost.Python.StaticProperty' object attribute 'doc' is read-only
Cplusplus-sig mailing list Cplusplus-sig at python.org http://mail.python.org/mailman/listinfo/cplusplus-sig
- Previous message: [C++-sig] AttributeError: 'Boost.Python.StaticProperty' object attribute '__doc__' is read-only
- Next message: [C++-sig] please add python::raw_constructor
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]