[C++-sig] Clearing lists in boost-python
stefan at seefeld.name
Wed Jun 22 17:15:30 CEST 2011
On 2011-06-22 11:04, charles75 wrote:
> I've been trying to clear a list of dictionaries from a list without
> The code below is a simple example of what I'm trying to achieve.
> dict a, b;
> list mylist;
> When I type in the last statement I get the error below from the linker
> ‘class boost::python::list’ has no member named ‘clear’.
Right, and neither does the Python 'list' type have such a method.
> Is there another way of clearing the list?
In Python you'd probably do something like
The equivalent of that in C++ is
...ich hab' noch einen Koffer in Berlin...
More information about the Cplusplus-sig