>
>
> This is indeed a perfectly valid way to make a metaclass, and it should
> definitely work to do the same thing in C++ using the C API and/or
> Boost.Python.
>
> The trouble is using that metaclass as the type of a Boost.Python-wrapped
> C++ class...that's what I think is basically impossible.
> -- Forwarded message --
> From: Jim Bosch
> To: Development of Python/C++ integration
> Cc:
> Date: Tue, 07 Feb 2012 11:14:54 -0500
> Subject: Re: [C++-sig] How to define a Python metaclass with Boost.Python?
> On 02/07/2012 01:35 AM, paulcmnt wrote:
>
>> The Python C API has th
The Python C API has the `PyObject *PyType_Type` object, which is
equivalent to `type` in the interpreter. If I want to define a metaclass in
C++, how can I set `type` as one of its bases in Boost.Python? Also, what
other things should I take into consideration when defining a Python
metaclass in C
On Tue, Aug 2, 2011 at 8:24 AM, Jim Bosch wrote:
>
> Hmm. That might mean you need to do a big design change; while it often
> works, one really isn't supposed to rely on __del__ being called when a
> Python object first could be garbage-collected - when cycles are involved,
> Python doesn't eve