SIG for development of Python/C++ integration

<H3>SIG for development of Python/C++ integration</H3>

The Python C++ SIG is a forum for discussions about the integration of Python and C++, with an emphasis on the development of the <a href="http://www.boost.org/libs/python/doc/index.html">Boost.Python library</a>. At the point of this writing (Jan 2002), Boost.Python is undergoing a major rewrite to add powerful new features and to take full advantage of the new type system introduced in Python 2.2. Suggestions regarding the direction of the development work and contributions in the form of source code should be posted to this SIG.

<h3>About <a href="http://www.boost.org/libs/python/doc/index.html" >Boost.Python</a></h3>

Boost.Python is a popular open-source tool for interfacing Python and C++. Boost.Python is built on accessible, well-maintained, well documented components (the Boost C++ Library), so it does not tie its users to the services of any one programmer or organization. Developers worldwide have contributed significant unsolicited improvements to the project. The main developer and coordinator of the library is <a href="http://www.boost.org/people/dave_abrahams.htm">David Abrahams</a>.

<H3>Development goals</H3>

The following sections describe the current development goals. Suggestions regarding the direction of the development work and contributions in the form of source code should be posted to the Python C++ SIG.

<dl>

<dt><b>Reference/Pointer support</b> <dd>

System Message: ERROR/3 (<string>, line 37)

Unexpected indentation.
Boost.Python currently refuses to wrap C++ functions which return pointers or non-const references, in order to prevent dangling pointers and references from causing crashes on the Python side. This limits the library's ability to export arbitrary C++ functions.

System Message: WARNING/2 (<string>, line 42)

Block quote ends without a blank line; unexpected unindent.
<p>
Goal: Implementation of a mechanism by which references and pointers to internal elements of function and method arguments can be returned safely. This will include a mechanism by which any argument object can be kept alive during the lifetime of any other argument object, so that Wrapped C++ objects can adopt one another without the direct use of smart pointers.

System Message: WARNING/2 (<string>, line 50)

Definition list ends without a blank line; unexpected unindent.

<p> <dt><b>Globally Registered Type Coercions</b> <dd>

System Message: ERROR/3 (<string>, line 53)

Unexpected indentation.
Goal: Provide a mechanism for global registration of type relationships between arbitrary Python and C++ types, so that, for example, a Python tuple might be automatically converted to a C++ std::vector when passed to a wrapped function accepting a std::vector argument.

System Message: WARNING/2 (<string>, line 58)

Block quote ends without a blank line; unexpected unindent.

<p> <dt><b>Full Cross-Module Support</b> <dd>

System Message: ERROR/3 (<string>, line 61)

Unexpected indentation.
Inheritance hierarchies which span Python extension modules are not currently supported by Boost.Python. Other inter-module interaction issues, e.g. exception handling, are expected to arise.

System Message: WARNING/2 (<string>, line 65)

Block quote ends without a blank line; unexpected unindent.
<p>
Goal: Full support for the interaction of wrapped types and functions residing in different extension modules.

System Message: WARNING/2 (<string>, line 68)

Definition list ends without a blank line; unexpected unindent.

<p> <dt><b>Improved Overloading Support</b> <dd>

System Message: ERROR/3 (<string>, line 71)

Unexpected indentation.
Boost.Python's support for overloaded functions and operators is based on throwing C++ exceptions when a signature fails to match the appropriate function. This has several disadvantages: firstly, on many implementations the C++ exception-handling mechanism is highly optimized for the case where no exception is thrown, and throwing an exception can pose serious performance penalties. Secondly, enough C++ implementations have bugs in their exception-handling mechanisms that it is best not to rely on exceptions for routine control flow.

System Message: WARNING/2 (<string>, line 82)

Block quote ends without a blank line; unexpected unindent.
<p>
Goal: Modification of the type conversion mechanism so that overloading can be implemented without the use of C++ exceptions.

System Message: WARNING/2 (<string>, line 86)

Definition list ends without a blank line; unexpected unindent.

<p> <dt><b>C++ to Python Exception Translation</b> <dd>

System Message: ERROR/3 (<string>, line 89)

Unexpected indentation.
It is critical for any mature C++ software package to be able to report error conditions via arbitrary exception types. Boost.Python currently provides support for translating only a limited selection of exception types to Python.

System Message: WARNING/2 (<string>, line 94)

Block quote ends without a blank line; unexpected unindent.
<p>
Goal: Implementation of a feature which allows arbitrary new exception types to be registered and automatically translated.

System Message: WARNING/2 (<string>, line 98)

Definition list ends without a blank line; unexpected unindent.

<p> <dt><b>Default Argument Support</b> <dd>

System Message: ERROR/3 (<string>, line 101)

Unexpected indentation.
C++ functions with default argument values can currently be exposed to Python, but the defaults are lost.

System Message: WARNING/2 (<string>, line 103)

Block quote ends without a blank line; unexpected unindent.
<p>
Goal: Implementation of compile-time constant default argument expressions. Potentially implementation of lambda expressions for describing default arguments.

System Message: WARNING/2 (<string>, line 107)

Definition list ends without a blank line; unexpected unindent.

<p> <dt><b>Keyword Argument Support</b> <dd>

System Message: ERROR/3 (<string>, line 110)

Unexpected indentation.
Python supports the specification of particular function arguments by name, rather than by position.

System Message: WARNING/2 (<string>, line 112)

Block quote ends without a blank line; unexpected unindent.
<p>
Goal: Implementation of a feature which allows keyword arguments to be used from Python for wrapped C++ functions.

System Message: WARNING/2 (<string>, line 116)

Definition list ends without a blank line; unexpected unindent.

<p> <dt><b>Generic C++ to Python Object Interface</b> <dd>

System Message: ERROR/3 (<string>, line 119)

Unexpected indentation.
It is often necessary for C++ functions to manipulate objects passed to them directly from Python, without converting them to some other representation. Currently Boost.Python has undocumented support for that usage when the expected Python type is known.

System Message: WARNING/2 (<string>, line 124)

Block quote ends without a blank line; unexpected unindent.
<p>
Goal: Addition of a C++ type which wraps any Python object and provides a similar interface to Python's, with the validity of any operation checked at runtime.

System Message: WARNING/2 (<string>, line 128)

Definition list ends without a blank line; unexpected unindent.

<p> <dt><b>Interface for the application of standard C++ algorithms to Python objects</b> <dd>

System Message: ERROR/3 (<string>, line 131)

Unexpected indentation.
Goal: Implementation of interfaces for the application of C++ Standard Template Library algorithms and boost algorithms to Python objects, such as Python lists, tuples, strings and Python objects that support the buffer interface.

System Message: WARNING/2 (<string>, line 136)

Block quote ends without a blank line; unexpected unindent.

<p> <dt><b>Python LONG support</b> <dd>

System Message: ERROR/3 (<string>, line 139)

Unexpected indentation.
Python provides an arbitrary-precision LONG integer type which is not currently supported by Boost.Python.

System Message: WARNING/2 (<string>, line 141)

Block quote ends without a blank line; unexpected unindent.
<p>
Goal: Addition of an interface to Python LONGs which allows them to be directly manipulated in C++ with a natural interface.

System Message: WARNING/2 (<string>, line 145)

Definition list ends without a blank line; unexpected unindent.

<p> <dt><b>Improved Built-In Numeric Type Coercion</b> <dd>

System Message: ERROR/3 (<string>, line 148)

Unexpected indentation.
Goal: Python supplies at least 4 numeric types, any of which should be able to be passed where an argument of any C++ numeric type is expected, provided that the conversion does not lose significant information.

System Message: WARNING/2 (<string>, line 152)

Block quote ends without a blank line; unexpected unindent.

<p> <dt><b>Python Iterator Support</b> <dd>

System Message: ERROR/3 (<string>, line 155)

Unexpected indentation.
Goal: Python 2.2 provides an iteration interface which should allow C++ sequences to be easily exposed to Python in a natural way.

System Message: WARNING/2 (<string>, line 158)

Block quote ends without a blank line; unexpected unindent.

<p> <dt><b>Automatic C++ Object Initialization</b> <dd>

System Message: ERROR/3 (<string>, line 161)

Unexpected indentation.
While Python allows classes to be created without initialization, C++ does not. Boost.Python currently allows C++ base classes of Python extension classes to remain uninitialized. That behavior is not always appropriate.

System Message: WARNING/2 (<string>, line 166)

Block quote ends without a blank line; unexpected unindent.
<p>
Goal: Optional support for the automatic default construction of C++ base classes and error reporting when base classes are not initialized.

System Message: WARNING/2 (<string>, line 170)

Definition list ends without a blank line; unexpected unindent.

<p> <dt><b>DocString Support</b> <dd>

System Message: ERROR/3 (<string>, line 173)

Unexpected indentation.

Modules, Types, and Functions in Python can be documented with "docstrings", which allow the automatic extraction of documentation (and even testing code) at runtime.

Goal: Full support for docstrings on the elements of C++ extension modules and classes.

System Message: WARNING/2 (<string>, line 179)

Block quote ends without a blank line; unexpected unindent.

<p> <dt><b>C++ long long support</b> <dd>

System Message: ERROR/3 (<string>, line 182)

Unexpected indentation.
The long long type is a popular extension to C++ which allows the representation of integer numeric values of at least 64 bits.

System Message: WARNING/2 (<string>, line 185)

Block quote ends without a blank line; unexpected unindent.
<p>
Goal: Automatic conversions of C++ long long values to/from Python.

System Message: WARNING/2 (<string>, line 188)

Definition list ends without a blank line; unexpected unindent.

<p> <dt><b>Code Footprint Reduction</b> <dd>

System Message: ERROR/3 (<string>, line 191)

Unexpected indentation.
Currently Boost.Python is not optimized to reduce the code size of the C++ extension modules.

System Message: WARNING/2 (<string>, line 193)

Block quote ends without a blank line; unexpected unindent.
<p>
Goal: Reengineering of Boost.Python so that the code footprint for each extension module is as small as feasible.

System Message: WARNING/2 (<string>, line 197)

Definition list ends without a blank line; unexpected unindent.

<p> <dt><b>Data Memory Footprint Reduction</b> <dd>

System Message: ERROR/3 (<string>, line 200)

Unexpected indentation.
Wrapped C++ classes that are not subclassed in Python use more dynamic allocation than necessary, increasing the overall data footprint of an application using Boost.Python extension classes.

System Message: WARNING/2 (<string>, line 204)

Block quote ends without a blank line; unexpected unindent.
<p>
Goal: Embedding of C++ classes directly in Python objects. This will eliminate the overhead due to dynamic allocation.

System Message: WARNING/2 (<string>, line 208)

Definition list ends without a blank line; unexpected unindent.

</dl>

Notice: While Javascript is not essential for this website, your interaction with the content will be limited. Please turn Javascript on for the full experience.