[C++-sig] cannot return boost::python::tuple

Ralf W. Grosse-Kunstleve rwgk at yahoo.com
Thu May 30 02:19:06 CEST 2002


I am having trouble returning a boost::python::tuple.
This works (reports None when called from Python):

  void//boost::python::tuple
  UnitCell_getinitargs(const UnitCell& uc) {
    boost::python::tuple initargs;
    //return initargs;
  }

This is what I really want:

  boost::python::tuple
  UnitCell_getinitargs(const UnitCell& uc) {
    boost::python::tuple initargs;
    return initargs;
  }

But I get:

Traceback (most recent call last):
  File "dbg.py", line 6, in ?
    print u.__getinitargs__()
TypeError: bad argument type for built-in operation

What am I doing wrong?

Thanks,
        Ralf


__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com





More information about the Cplusplus-sig mailing list