The library I am wrapping creates a subclass TCEString of
std::string.
Py++ generates me bindings for the subclass, but in Python
the
subclass does not quite work like std::string. For example,
the Python expression
"%s.%s.%s" % (term.functionUnit().name(),
term.port().name(),
term.operation().name())
returns the string
"universal_fu.OCSetting32.<TCE.tools.TCEString
object at 0x81308ec>"
because term.operation().name() returns a TCEString instead
of std::string.
Is there some convenient way to make the subclass work like
std::string?
I know how to do it by defining a __str__ method in the
Python class,
but I am hoping that there might be a simpler way to do it
using
Boost.Python or Py++.
--
Pertti
_______________________________________________
C++-sig mailing list
C++-sig python.org
http:
//mail.python.org/mailman/listinfo/c++-sig
|