[C++-sig] How to use functionality of list.

Roman Yakovenko roman.yakovenko at gmail.com
Wed May 5 13:40:05 CEST 2010


On Wed, May 5, 2010 at 2:20 PM, vishal bayskar
<vishal.bayskar at nechclst.in> wrote:
>
>>There is no need to expose std containers directly. Instead, expose
>>declarations that are using them and Py++ will do the rest.
>
>>mb.free_function( 'getDummyAlist' ).include()
>
>>This topic is covered in the following document:
>>http://language-binding.net/pyplusplus/documentation/containers.html
>
>
> Yes I tried like as you suggested.
> but I am not able to use the functionality of list from python.
> Like suppose I need to use push_back etc from python.

Both indexing suites provides interface very similar to Python
containers. So the user will not have to learn new API, but if you
insists, you can rename/introduce new method from Python

AList.push_back = AList.append

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


More information about the Cplusplus-sig mailing list