mirror of
https://github.com/boostorg/python.git
synced 2026-01-23 17:52:17 +00:00
no message
[SVN r7947]
This commit is contained in:
81
todo.txt
81
todo.txt
@@ -5,23 +5,98 @@ Document error-handling
|
||||
Consider renaming PyPtr to Reference.
|
||||
Report Cygwin linker memory issues
|
||||
handle more arguments
|
||||
MI from both ExtensionClasses and Python classes, or at least don't crash(!)
|
||||
Remove one level of indirection on type objects (no vtbl?).
|
||||
Much more testing, especially of things in objects.h
|
||||
Make multiple inheritance from real Python classes work.
|
||||
Make multiple inheritance from real Python classes work - I don't think this is possible
|
||||
Handle polymorphism (passing a Wrapped<Derived> as a Base*).
|
||||
Specializations of Caller<> for commmon combinations of argument types (?)
|
||||
special member functions for numeric types
|
||||
pickling support
|
||||
testing with Python 2.0
|
||||
|
||||
Documentation:
|
||||
Contributors
|
||||
|
||||
Comparison with other systems:
|
||||
CXX
|
||||
SWIG
|
||||
Zope ExtensionClasses
|
||||
?
|
||||
|
||||
Supported Python versions
|
||||
|
||||
building
|
||||
|
||||
Private virtual functions with default implementations
|
||||
|
||||
overloading and the overload resolution mechanism
|
||||
|
||||
special member functions
|
||||
|
||||
exposing data members as attributes
|
||||
|
||||
adding conversions for fundamental types
|
||||
generic conversions for template types (with partial spec).
|
||||
extending multiple-argument support.
|
||||
|
||||
extending multiple-argument support using gen_all.py
|
||||
|
||||
differences between Python classes and ExtensionClasses
|
||||
additional capabilities of ExtensionClasses
|
||||
|
||||
exception handling
|
||||
building
|
||||
|
||||
dealing with non-const reference/pointer parameters
|
||||
|
||||
limitations
|
||||
templates
|
||||
Yes. If you look at the examples in extclass_demo.cpp you'll see that I have
|
||||
exposed several template instantiations (e.g. std::pair<int,int>) in Python.
|
||||
Keep in mind, however, that you can only expose a template instantiation,
|
||||
not a template. In other words, MyTemplate<Foo> can be exposed. MyTemplate
|
||||
itself cannot.
|
||||
|
||||
Well, that's not strictly true. Wow, this is more complicated to explain
|
||||
than I thought.
|
||||
You can't make an ExtensionClass<MyTemplate>, since after all MyTemplate is
|
||||
not a type. You can only expose a concrete type to Python.
|
||||
|
||||
What you *can* do (if your compiler supports partial ordering of function
|
||||
templates - MSVC is broken and does not) is to write appropriate
|
||||
from_python() and to_python() functions for converting a whole class of
|
||||
template instantiations to/from Python. That won't let you create an
|
||||
instance of MyTemplate<SomePythonType> from Python, but it will let you
|
||||
pass/return arbitrary MyTemplate<SomeCplusplusType> instances to/from your
|
||||
wrapped C++ functions.
|
||||
|
||||
template <class T>
|
||||
MyTemplate<T> from_python(PyObject* x, py::Type<MyTemplate<T> >)
|
||||
{
|
||||
// code to convert x into a MyTemplate<T>... that part is up to you
|
||||
}
|
||||
|
||||
template <class T>
|
||||
PyObject* from_python(const MyTemplate<T>&)
|
||||
{
|
||||
// code to convert MyTemplate<T> into a PyObject*... that part is up to
|
||||
you
|
||||
}
|
||||
|
||||
For example, you could use this to convert Python lists to/from
|
||||
std::vector<T> automatically.
|
||||
|
||||
enums
|
||||
|
||||
the importance of declaration order of ClassWrappers/ExtensionInstances
|
||||
|
||||
out parameters and non-const pointers
|
||||
|
||||
returning references to wrapped objects
|
||||
|
||||
About the vc6 project and the debug build
|
||||
|
||||
About doctest.py
|
||||
|
||||
Boost remarks:
|
||||
|
||||
> > One of us is completely nuts ;->. How can I move the test
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user