[C++-sig] from python conversions

Ralf W. Grosse-Kunstleve rwgk at yahoo.com
Tue Jun 25 20:54:56 CEST 2002


--- Martin Casado <casado2 at llnl.gov> wrote:
>  Am I correct in thinking that we need to use rvalue_from_python
>  and lvalue_from_python?  Is there any mechanism similar to
>  the old method, in which for a given type_id you can register
>  two functions, one to determine whether you can convert the object,
>  and the second to do the conversion?

Until you get a more definitive answer from David (who still seems to be stuck
in the Microsoft gravity well), check this out:

http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/cctbx/cctbx/include/cctbx/bpl_utils.h?rev=1.2.2.14&only_with_tag=boost_python_v2_transition&content-type=text/vnd.viewcvs-markup

Look for

struct register_container_from_python_sequence

HTH,
        Ralf


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





More information about the Cplusplus-sig mailing list