[OT] Quick intro to C++ for a Python and C user?

Grant Edwards invalid at invalid.invalid
Tue Dec 20 15:51:29 EST 2011


On 2011-12-20, Grant Edwards <invalid at invalid.invalid> wrote:

> Would anybody care to recommend online C++ resources for a long time C
> and Python user?  (I'm also familiar with Smalltalk, Scheme, FORTRAN,
> bash, Javascript, and a variety of assembly languages.)
>
> I have a C++ library to which I need to add a couple minor
> wrappers/extensions. I've already done the same for the C version of
> the library.  Writing test suites for C libraries using Python/ctypes
> is pretty cool. :)

I stumbled across an undergrad CSci lesson that showed in a couple
pages how to subclass something and add a couple methods.  All I
needed to do was add four methods containing two lines of code each.

Unfortunately, I had to muck about with the original library's code to
change a couple things from "private" to "protected" to allow me to
extend the class to do what needed to be done.  Every time I have to
do anything with C++ (once every handfull of years) it feels like
swimming against the current...

It probably would have been simpler to just add the code to the
original library's implementation, but that would have introduced a
"backwards" dependency in the system's libraries.

-- 
Grant Edwards               grant.b.edwards        Yow! A dwarf is passing out
                                  at               somewhere in Detroit!
                              gmail.com            



More information about the Python-list mailing list