boost.python/object

Legacy Wiki Page

This page was migrated from the old MoinMoin-based wiki. Information may be outdated or no longer applicable. For current documentation, see python.org.

The library provides a class called object, which encapsulates a valid Python object and provides a similar interface to Python’s.

object operators

The first challenge was to provide support for object manipulations using a Python-like syntax, mostly in the form of operator overloads:

object conversions

object has a templated constructor which can be used to convert any C++ object to Python using the same underlying mechanisms used for the arguments to call<>.

If an object instance is created without any arguments to the constructor then this instance holds the value None.

object from PyObject *

You cannot directly construct an object from a PyObject *, see /handle