~~~ Python Use Question ~~~
Greg Ewing
see_reply_address at something.invalid
Tue Nov 26 23:10:32 EST 2002
smartcardware.com wrote:
> "Python's internal object structure requires translating your ojects
> into python objects."
>
> and
>
> "double translation issues like Python does (C++ code passes
> translated object to python, python code calls back into C++ which
> must instance a new object and translate it to be usable YUK !!"
It's certainly not necessary to "translate" all your objects
into Python objects. You can easily extend Python with new
object types which "wrap" your data structures and provide
methods for accessing them from Python. References to these
objects can be freely passed around between Python and C/C++
code without needing to copy or translate anything.
--
Greg Ewing, Computer Science Dept,
University of Canterbury,
Christchurch, New Zealand
http://www.cosc.canterbury.ac.nz/~greg
More information about the Python-list
mailing list