[C++-sig] will custom lvalue converters be supported?

Igor Lapshin igor at pcigeomatics.com
Wed Jul 21 00:05:39 CEST 2004



I am wondering if custom lvalue converters are planned to be supported
in near future. The FAQ say that they are not supported, but I found
some declarations in Python.Boost source code, which look as relevant to
lvalue conversions, e.g. void* get_lvalue_from_python(). 

I have almost exactly the situation as it is described in FAQ (but with
my custom classes): 


void foo(std::vector<double>& array)
  for(std::size_t i=0;i<array.size();i++) {
    array[i] *= 2;


>>> l = [1, 2, 3]
>>> foo(l)
>>> print l
[2, 4, 6]

Custom lvalue converters require changes to the Boost.Python core
library and are currently not available.



Igor Lapshin


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20040720/fed9e61a/attachment.htm>

More information about the Cplusplus-sig mailing list