...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
An Extractor is a class which Boost.Python can use to extract C++ objects
from Python objects, and is typically used by facilities that define from_python
conversions for "traditional"
Python extension types.
In the table below, X
denotes
a model of Extractor
and
a
denotes an instance of
a Python object type.
Expression |
Type |
Semantics |
---|---|---|
|
non-void |
Returns the C++ object being extracted. The execute function must not be overloaded. |
|
|
Points to the |
Informally, an Extractor's execute member must be a non-overloaded static function whose single argument is a Python object type. Acceptable Python object types include those publicly (and unambiguously) derived from PyObject, and POD types which are layout-compatible with PyObject.