[C++-sig] Boost.Python and std::string subclassing

Roman Yakovenko roman.yakovenko at gmail.com
Mon May 5 22:22:56 CEST 2008


On Mon, May 5, 2008 at 10:18 PM, Pertti Kellomäki
<pertti.kellomaki at tut.fi> wrote:
> Roman Yakovenko wrote:
>
> > I am not sure I fully understand you.
> >
> > Do you want to add new method "__str__" to TCEString ? If so take a
> > look on this document:
> > http://language-binding.net/pyplusplus/documentation/inserting_code.html
> >
>
>  Sorry for being obtuse.

You don't have, really :-)

> Since Boost.Python converts std::string
>  to Python strings, I was hoping that I could easily tell either
>  Boost.Python or Py++ to do the same thing for TCEString, by
>  the virtue of it being a subclass of std::string.

In this case, my second receipt will work for you.


-- 
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/



More information about the Cplusplus-sig mailing list