[sage-devel] Re: adding a c++ library: how/what objects are pasted

2014-07-10 Thread Jean-Pierre Flori
On Wednesday, July 9, 2014 4:52:19 PM UTC+2, David Mödinger wrote: > > > > Am Mittwoch, 9. Juli 2014 16:18:03 UTC+2 schrieb Volker Braun: >> >> Python/Cython classes are not C++ classes, so you can't call Py/Cy >> methods from C++ code directly. It can of course be done using the CPython >> C A

[sage-devel] Re: adding a c++ library: how/what objects are pasted

2014-07-09 Thread David Mödinger
Am Mittwoch, 9. Juli 2014 17:27:21 UTC+2 schrieb Volker Braun: > > IMHO its better to go with the first option. You essentially want to add a > single new method to matrices, it'll be easier to write and maintain to not > have to dig through a layer of Python->C++ indirection. > > The linbox c

[sage-devel] Re: adding a c++ library: how/what objects are pasted

2014-07-09 Thread Volker Braun
IMHO its better to go with the first option. You essentially want to add a single new method to matrices, it'll be easier to write and maintain to not have to dig through a layer of Python->C++ indirection. The linbox code of course uses the LinBox C++ matrix class. Then there is always some s

[sage-devel] Re: adding a c++ library: how/what objects are pasted

2014-07-09 Thread David Mödinger
Am Mittwoch, 9. Juli 2014 16:18:03 UTC+2 schrieb Volker Braun: > > Python/Cython classes are not C++ classes, so you can't call Py/Cy methods > from C++ code directly. It can of course be done using the CPython C API or > Boost.Python, but a Python object is never a straight C++ object. For >

Re: [sage-devel] Re: adding a c++ library: how/what objects are pasted

2014-07-09 Thread William Stein
On Wed, Jul 9, 2014 at 7:18 AM, Volker Braun wrote: > Python/Cython classes are not C++ classes, so you can't call Py/Cy methods > from C++ code directly. It can of course be done using the CPython C API or > Boost.Python, but a Python object is never a straight C++ object. For > starters it doesn

[sage-devel] Re: adding a c++ library: how/what objects are pasted

2014-07-09 Thread Volker Braun
Python/Cython classes are not C++ classes, so you can't call Py/Cy methods from C++ code directly. It can of course be done using the CPython C API or Boost.Python, but a Python object is never a straight C++ object. For starters it doesn't have a C++ vtable, methods can be added dynamically in