[C++-sig] Delete objects, remove from dict

Simon W simwarg at gmail.com
Mon Oct 25 17:48:27 CEST 2010


Hey and thanks for the answer! Unfortunately that doesn't seem to work. I'm
using boost.python for Python 3 ( boost python 1.44? )

error C2039: 'del' : is not a member of 'boost::python::api::object'

I've had a look on the reference manual but I don't understand if it's a
free function or an method of object() ? Neither work ..

The code i'm using:
*            object obj = mMainNamespace[ name.c_str() ];
            obj.del();*

// Simon

On Mon, Oct 25, 2010 at 1:26 AM, Ralf W. Grosse-Kunstleve <rwgk at yahoo.com>wrote:

> > namespace.remove("test"); // <- how can I do something like this with
> boost
> >python?
>
> namespace["test"].del();
>
> See also:
>
> http://www.boost.org/doc/libs/1_44_0/libs/python/doc/v2/object.html
>
> Ralf
> _______________________________________________
> Cplusplus-sig mailing list
> Cplusplus-sig at python.org
> http://mail.python.org/mailman/listinfo/cplusplus-sig
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20101025/1f79b227/attachment.html>


More information about the Cplusplus-sig mailing list